1 (edited by Frank H 2005-03-26 18:39)

Topic: Plugin name cannot be named "something_Mod_2.0.php"

Been working on 'Something Mod 2.0' wink ... and in 1.2.4 it's not possible to name the plugins "Something_Mod_2.0.php", worked fine in earlier version(s) (worked on 1.2), but not any more (get's a "followed outdated link error"), but ... for me it's ok though, I'll just skip the last part, and call it "Something Mod 2", and it then fits one line also wink

Just wanted to give a hint of it, and that perhaps just add it in the template plugin file, that one shouldn't use . in plugin-names either?


(Sigh ... been a bit inactive lately ... but the Something Mod 2.0 will be released sometime wink)

Re: Plugin name cannot be named "something_Mod_2.0.php"

any chance of the attachment mod? from what i understand you've pretty much finished it?

oh btw i'm extremly interested in what this mod could be wink especially since its 2.0 hmm

Re: Plugin name cannot be named "something_Mod_2.0.php"

well, not to go too much OT, yeah that's the one, but I ran into some troubles, and now I'm too tired to figure out the problem on that one (viewtopic doesn't show all posts) ... but install_mod.php seems to work anyhow ... just fixing that and the conversion from old format needed to be done, I suppose, & afterwards polish it alittle ... (making sure that the readme.txt is with the correct things, and such wink)

but ... I'll release it when it's ready, and it aint that atm wink but it feels like it shouldn't take that long...

now, lets stay on topic wink

Re: Plugin name cannot be named "something_Mod_2.0.php"

ok i know i rush mods and they are all broken when i release them neutral but nvm anyway

ontopic: maybe it should say alphanumeric characters only and _ for spaces since not alot else works

5 (edited by Smartys 2005-03-26 22:34)

Re: Plugin name cannot be named "something_Mod_2.0.php"

That has to do with the admin_loader bug I found, and Rickard's fix for it. Let me check the code...

Edit: Knowing very little about regular expressions, I can't come up with a working one.
The problem expression here is:

if (!preg_match('/^AM?P_(\w*?)\.php$/i', $plugin))

Now, if someone can find a way to make it work here and it doesn't re-create the exploit I found, I'm sure Rickard would be more then happy to put it in... wink

Re: Plugin name cannot be named "something_Mod_2.0.php"

[a-zA-Z0-9\.] instead of \w maybe? plus any other characters you might want

edit: or [\w\.] i think

Re: Plugin name cannot be named "something_Mod_2.0.php"

If I'm changing the file correctly, neither is fixing it

Re: Plugin name cannot be named "something_Mod_2.0.php"

Well (\S*?) would work over (\w*?)...I guess, but that may not be exactly what you want todo.

I enjoy pie :)

Re: Plugin name cannot be named "something_Mod_2.0.php"

i dunno if \S gives too much freedom

Re: Plugin name cannot be named "something_Mod_2.0.php"

Yeah thats why I wasn't sure if it was what you guys were looking for

I enjoy pie :)

Re: Plugin name cannot be named "something_Mod_2.0.php"

I'll test and see if it gives enough to reintroduce the exploit

Re: Plugin name cannot be named "something_Mod_2.0.php"

That doesn't work for me either hmm

That line for me:

if (!preg_match('/^AM?P_(\S*?)\.php$/i', $plugin))

The file: AMP.Example.php
Someone tell me what I'm doing wrong?

Re: Plugin name cannot be named "something_Mod_2.0.php"

The file HAS to begin with AMP_ or AP_

I enjoy pie :)

14 (edited by Frank H 2005-03-27 12:26)

Re: Plugin name cannot be named "something_Mod_2.0.php"

my bad ... "AMP_Something_Mod_2.0.php" failed, forgot to add that amp-stuff in the first post, sorry wink

15 (edited by Smartys 2005-03-27 12:30)

Re: Plugin name cannot be named "something_Mod_2.0.php"

lol, good point :-/

I can't replicate the admin loader exploit using  (\S*?)

Re: Plugin name cannot be named "something_Mod_2.0.php"

Actually, I would prefer it if the plugin names didn't include the version number but instead displayed it at the top of the page or something.

"Programming is like sex: one mistake and you have to support it for the rest of your life."