Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: feline on September 05, 2015, 11:32:33 AM

Title: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 11:32:33 AM
We released the second Beta of our Portal software for SMF 2.1 Beta 2.

We added many new function to this release... try it .. test it.

You can see this in action on our site http://virgo.portamx.com and download on https://github.com/PortaMx

Note, that SMF 2.1 and PortaMx Virgo are Beta releases. Don't use this on productive sites !!!
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: d3vcho on September 05, 2015, 12:03:43 PM
It looks very great, nice work!
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 05, 2015, 12:07:54 PM
sorry.... doesn't install at all

failed on every process...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 05, 2015, 03:51:14 PM

Notice: Undefined index: package_readme in D:\wamp\www\github2.1\Sources\Packages.php on line 332

SMF cannot parse a readme that is .md apparently.

Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 04:28:31 PM
I have just tested the install with the developed SMF 2.1 beta 2 package ... installation works perfect without any problem.

So I don't known why you have problems ...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 04:32:25 PM
Quote from: Illori on September 05, 2015, 03:51:14 PM
SMF cannot parse a readme that is .md apparently.
That file is not parsed .. it's only in the zip file..
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 04:35:41 PM
Quote from: Kindred on September 05, 2015, 12:07:54 PM
sorry.... doesn't install at all

failed on every process...
is it possible, that your server can't install a file where the package is in a subdir.. like github that make
then you can repack the archive ...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 05, 2015, 05:00:40 PM
i repacked the archive and it was still giving me the errors that kindred showed as well as the readme error.

<readme type="file" parsebbc="true">install/readme.bbc</readme>

i guess SMF cant read a .bbc file either.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 05:44:48 PM
works as well on my installs ...

Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 05, 2015, 05:59:00 PM
are you using the latest source from github for 2.1? mine is from 12am EDT today.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 05, 2015, 06:09:08 PM
Quote from: Illori on September 05, 2015, 05:59:00 PM
are you using the latest source from github for 2.1? mine is from 12am EDT today.
No .. i use the released beta 2 from download section

a other interesting thing .. how ecl works for normal user vs spider (see image)  :)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fvirgo.portamx.com%2Fimg%2Fspider_vs_user.png&hash=314da95f5c08788c46b79ea1ca14b3fa911516a9)
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 05, 2015, 06:44:14 PM
Ah... Well, that one is already outdated...   But it looks like the current build may have broken the package manager,  have to try some other mods
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 05, 2015, 07:22:18 PM
Quote from: Kindred on September 05, 2015, 06:44:14 PM
Ah... Well, that one is already outdated...   But it looks like the current build may have broken the package manager,  have to try some other mods

yep it is the package manager. it is broken now.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 06, 2015, 06:16:47 AM
Quote from: Kindred on September 05, 2015, 06:44:14 PM
Ah... Well, that one is already outdated...
Well .. that is the one and only "offical release" of 2.1 😕
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: live627 on September 06, 2015, 06:23:40 AM
Quote from: Illori on September 05, 2015, 07:22:18 PM
Quote from: Kindred on September 05, 2015, 06:44:14 PM
Ah... Well, that one is already outdated...   But it looks like the current build may have broken the package manager,  have to try some other mods

yep it is the package manager. it is broken now.
Try today's build. Seems to be fixed now.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 06, 2015, 06:40:48 AM
yep both issues seem resolved.

thanks for looking into it.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 06, 2015, 07:49:08 AM
Well .. I will test it with the current Github Version comming Werk ...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 06, 2015, 10:39:05 AM
Well .. I tested the current Github release ..

two fixes are need on the installer (simple to fix)

and I see, that the WIRELESS mode is completely removed !?

I see that correct ?
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: live627 on September 06, 2015, 10:59:19 AM
ayup
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 06, 2015, 11:14:26 AM
ah .. ok .. that needs a lot of removes and fixes.

It's done on my test system ..
After all test i will update github .
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 06, 2015, 12:20:44 PM
A other bug I found on the package manager ..

At final install, a html file is shown to see the install result.

<redirect url="$scripturl?action=admin;area=pmx_center" timeout="60000">install/installdone.html</redirect>

That worked in ALL releases .. but NOT in the current github release.

That is a bug I think ... can you fix that please !?
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 06, 2015, 03:02:36 PM
actually - that seems to be part of the (remove HTML in anything -- which in this case, is definitely a potential security issue) -- so the readme displayed after the installation should be using BBC, not HTML any more.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 06, 2015, 03:12:21 PM
Quote from: Kindred on September 06, 2015, 03:02:36 PM
actually - that seems to be part of the (remove HTML in anything -- which in this case, is definitely a potential security issue) -- so the readme displayed after the installation should be using BBC, not HTML any more.

i dont recall that html has been removed from the readme type stuff in installing packages. if we do want to do it, it should be opened as an issue on github.

i tested a mod that is for 2.0 that has html in the uninstaller, it shows up just fine in 2.1... so html has not been disabled in this area.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 06, 2015, 06:22:35 PM
Every single mod I have installed on 2.1 has displayed the readme is text -- including not parsing any HTML, if such is included...

and I was happy -- because it is a potential security hole... I could include malicious code in the mod readme...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 06, 2015, 06:34:36 PM
there is a readme that can be added after you uninstall the mod, that can still be parsed with html
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 07, 2015, 06:54:51 AM
Interesting what i read here  :D

Can anyon now tell me if a html readme works after install or not?
Can I use a BBC readme ?

It was great, if this  point cleared for me .. thanks
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 07, 2015, 07:16:28 AM
Well .. I found why html not worked on redirect (in fact, only text will work here, that is not good !!)


// Handle a redirect...
elseif ($action['type'] == 'redirect' && !empty($action['redirect_url']))
{
$context['redirect_url'] = $action['redirect_url'];
$context['redirect_text'] = !empty($action['filename']) && file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename']) ? $smcFunc['htmlspecialchars'](file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename'])) : ($context['uninstalling'] ? $txt['package_uninstall_done'] : $txt['package_installed_done']);
$context['redirect_timeout'] = $action['redirect_timeout'];


The $smcFunc['htmlspecialchars'] will destroy all html tag .. that is ugly and have nothing todo with security ..

But .. if smf mean that, then it was a good option to allow here bbc code (as in the readme BEFORE install).
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 07, 2015, 07:29:36 AM
actually, that *IS* good.  That is exactly what SHOULD be happening - see my comments above.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 07, 2015, 11:47:13 AM
The result it's (maybe) very ugly .. no line breaks, nothing.
I think, a simple <br /> is no risk .. but the result can be read .. the current situation is ugly .. VERY !!
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 07, 2015, 01:54:15 PM
Well .. I looked at that and found s solution, they NOT have any risk, but give the result string more redable structure.

In the file Packages.template.php make the simple change:
find:

// If we are going to redirect we have a slightly different agenda.
if (!empty($context['redirect_url']))
{
echo '
', $context['redirect_text'], '<br><br>
<a href="', $context['redirect_url'], '">', $txt['package_installed_redirect_go_now'], '</a> | <a href="', $scripturl, '?action=admin;area=packages;sa=browse">', $txt['package_installed_redirect_cancel'], '</a>';
}


replace width:

// If we are going to redirect we have a slightly different agenda.
if (!empty($context['redirect_url']))
{
echo '
', str_replace('\n', '<br>', $context['redirect_text']), '<br><br>
<a href="', $context['redirect_url'], '">', $txt['package_installed_redirect_go_now'], '</a> | <a href="', $scripturl, '?action=admin;area=packages;sa=browse">', $txt['package_installed_redirect_cancel'], '</a>';
}


That will replace all "newline" (\n) to a simple <br> and gives the output a little bit more structure without any risk ..

Thank for reading...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: live627 on September 07, 2015, 03:00:22 PM
I thought parse_bbc() already did that.

EDIT: My bad, I should've seen the code before assuming...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 07, 2015, 03:41:20 PM
 ;D at this point no bbc is parsed .. but that is not a big problem, if SMF apply the small change I posted.
That is no risk, but helps to get a textural read.me a better redable ...

a not from me;
I think, a bbs parse at this point is also no risk, but a very better visuabillity  :)
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: margarett on September 07, 2015, 07:10:27 PM
IIRC, it should destroy HTML (it's one of the security issues patched between 2.0.8 and 2.0.10, as a evil package could use HTML to perform evil stufzzzz :) )
And a txt file with BBC should be perfectly parsed but as a readme. I never actually tried a redirect to a page (which isn't an SMF page itself) in a file but, according to the same security principle above, it should not be allowed...

@live627, is it possible to parse a page which isn't even tied to SMF?
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: live627 on September 07, 2015, 10:20:37 PM
What do you mean? In a SSI page, you can call the function.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: margarett on September 08, 2015, 07:12:26 AM
There is no SSI in this page
https://github.com/PortaMx/PortaMx-Virgo-2.0-Beta-2/blob/master/install/installdone.html

(admittedly I'm confused about this because I'm not used to see redirects to HTML pages, just inline text and I haven't really tried it :(
And this is something we need to sanitize because this presents the same level of "security issue" of the other PackMan sanitized stuff... we sanitized package name, readme, etc etc... So we need to make sure that BBC can be parsed (like in the readme) and that no HTML can be used. I think :P )
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 08, 2015, 08:10:24 AM
yes, we do...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 08, 2015, 08:20:54 AM
What we do with this page ...

We insert all action results from the database installer in this file, so the user can see what the installer (php) have made.
I think this is a good option to inform the user, what a mod do ...

The minimum html code we need for this is a simple <br>, because a \n do not work here.
And that can be done, with the simple change I posted ...
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 08, 2015, 08:57:27 AM
As I see just ..

Why you have removed the Forum width in Theme settings ?
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Illori on September 08, 2015, 08:58:25 AM
it can break the responsive theme so it was removed.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 08, 2015, 10:40:12 AM
I just comitted the new release for SMF 2.1 (current Github version)  ;)

see https://github.com/PortaMx/PortaMx-Virgo-2.0-Beta-2/
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Antes on September 08, 2015, 11:12:37 AM
You should leave the table design as well. :)
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: feline on September 08, 2015, 12:39:36 PM
Quote from: Antes on September 08, 2015, 11:12:37 AM
You should leave the table design as well. :)
Well .. the one table is need, because div's you can't collapse in this case ..
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Kindred on September 08, 2015, 12:44:41 PM
why can't you collapse divs?


tables should only be used for tabular data display, these days - not for layout.
Title: Re: PortaMx 2.0 Virgo for SMF 2.1 Beta 2 released
Post by: Antes on September 08, 2015, 01:14:46 PM
Table (<table>) is no longer needed on the interwebz. You can use display: table/table-row/table-cell element to empower it (if you need).