Script part url can't contains upper case letters

Bug #446411 reported by Xavier Brochard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Woda
Fix Committed
Low
Unassigned

Bug Description

Part of this was reported by Alexander, long time ago.
See http://www.notyourhomework.net/cgi-bin/woda/faqs.pl/Show?_id=8443

Concerns Woda version 4.0 4.1 4.2 4.6.x

If the url contains something like http://www.server.xyz/Path/to/the/scriptfile.cgi (note the uppercase letter), the Woda engine will forward it to http://www.server.xyz/Home (or http://www.server.xyz/Upgrade24 in case of new database).
The path to the scriptfile is lost if one of your directory starts with an uppercase letter!

The problem is in sub mainPathInfo. The check below was added to allow Home at server root in the "pro" version:
elsif ($ENV{SCRIPT_NAME} =~ m|^/[A-Z]|)
Inserting the code from pro will not fix, as $SCRIPTNAME will still remains undefined.

I suggest to not fix at first, but keep this bug open, as we can may be found another way to allow Home at server root.

Related branches

Xavier Brochard (xavier)
Changed in woda:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Xavier Brochard (xavier) wrote :

This is a possible fix:
change:
elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]| )
to something that will check for uppercase characters, followed by everything but a slash:
elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]!/+| )

Tested against these urls:
http://woda/Demos/news.cgi woda supplied demo script
http://woda/db/use/x1930 database created from web interface

And of course, it works :-)
But it should be tested also with redirected urls using ScriptAliasMatch

Revision history for this message
Malcolm Fitzgerald (malcolm-notyourhomework) wrote : Re: [Bug 446411] Re: Script part url can't contains upper case letters

Hi Xavier,

I think you may have forgotten the most common case:

What about this url? : http://woda/Demos/news.cgi/Search

Malcolm

On 28/01/2010, at 3:31 AM, Xavier Brochard wrote:

> This is a possible fix:
> change:
> elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]| )
> to something that will check for uppercase characters, followed by everything but a slash:
> elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]!/+| )
>
> Tested against these urls:
> http://woda/Demos/news.cgi woda supplied demo script
> http://woda/db/use/x1930 database created from web interface
>
> And of course, it works :-)
> But it should be tested also with redirected urls using ScriptAliasMatch
>
> --
> Script part url can't contains upper case letters
> https://bugs.launchpad.net/bugs/446411
> You received this bug notification because you are a member of Woda,
> which is the registrant for Woda.
>
> Status in Woda, the Web Oriented DAtabase: Confirmed
>
> Bug description:
> Part of this was reported by Alexander, long time ago.
> See http://www.notyourhomework.net/cgi-bin/woda/faqs.pl/Show?_id=8443
>
> Concerns Woda version 4.0 4.1 4.2 4.6.x
>
> If the url contains something like http://www.server.xyz/Path/to/the/scriptfile.cgi (note the uppercase letter), the Woda engine will forward it to http://www.server.xyz/Home (or http://www.server.xyz/Upgrade24 in case of new database).
> The path to the scriptfile is lost if one of your directory starts with an uppercase letter!
>
> The problem is in sub mainPathInfo. The check below was added to allow Home at server root in the "pro" version:
> elsif ($ENV{SCRIPT_NAME} =~ m|^/[A-Z]|)
> Inserting the code from pro will not fix, as $SCRIPTNAME will still remains undefined.
>
> I suggest to not fix at first, but keep this bug open, as we can may be found another way to allow Home at server root.
>
>

Revision history for this message
Xavier Brochard (xavier) wrote :

Hi Malcolm

I should have detailed my tests ;-)
It was tested with most current Actions on woda.
tested also with:
http://woda/DemoS/news.cgi/Action
http://woda/DEMOS/news.cgi/Action
and still working :)

NB: my first regexp was m|^/[A-Z][^/]+| but it doesn't work, and I don't
understand why.

xavier

Le jeudi 28 janvier 2010 01:55:21, vous avez écrit :
> Hi Xavier,
>
> I think you may have forgotten the most common case:
>
> What about this url? : http://woda/Demos/news.cgi/Search
>
> Malcolm
>
> On 28/01/2010, at 3:31 AM, Xavier Brochard wrote:
> > This is a possible fix:
> > change:
> > elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]| )
> > to something that will check for uppercase characters, followed by
> > everything but a slash: elsif ( $ENV{'SCRIPT_NAME'} =~ m|^/[A-Z]!/+| )
> >
> > Tested against these urls:
> > http://woda/Demos/news.cgi woda supplied demo script
> > http://woda/db/use/x1930 database created from web interface
> >
> > And of course, it works :-)
> > But it should be tested also with redirected urls using ScriptAliasMatch
>

Xavier
<email address hidden> - 09 54 06 16 26

Xavier Brochard (xavier)
Changed in woda:
status: Confirmed → Fix Committed
Xavier Brochard (xavier)
Changed in woda:
milestone: none → merge-with-pro
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.