[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-devel
Subject:    [SM-DEVEL] URL problems in src/addrbook_search_html.php
From:       Attila Nagy <bra () fsn ! hu>
Date:       2003-11-28 11:24:30
[Download RAW message or body]

Hello,

The following snippet is from src/addrbook_search_html.php:
/* Search form */
echo '<center>' .
     html_tag( 'table', '', 'center', '', 'border="0"' ) .
     html_tag( 'tr' ) .
     html_tag( 'td', '', 'left', '', 'nowrap valign="middle"' ) . "\n" .
     '<FORM METHOD=post NAME=f ACTION="' . $PHP_SELF .
     '?html_addr_search=true">' . "\n<CENTER>\n" .
     '  <nobr><STRONG>' . _("Search for") . "</STRONG>\n";

The problem here is that when the script is invoked first time, it will 
append ?html_addr_search=true to the URL and when it is invoked second 
time, the URL already has ?html_addr_search=true.

This works with the normal case, but won't, when the client accesses the 
web server behind a HTTP proxy which does strict RFC conformance checking.

It will find that URL bad:
https://webmail.qwerty.com/squirrelmail/src/addrbook_search_html.php?html_addr_search=true?html_addr_search=true


A quick fix, which solves the above problem:

/* Search form */
$parsed=parse_url($PHP_SELF);
echo '<center>' .
     html_tag( 'table', '', 'center', '', 'border="0"' ) .
     html_tag( 'tr' ) .
     html_tag( 'td', '', 'left', '', 'nowrap valign="middle"' ) . "\n" .
     '<FORM METHOD=post NAME=f ACTION="' . $parsed['path'] .
     '?html_addr_search=true">' . "\n<CENTER>\n" .
     '  <nobr><STRONG>' . _("Search for") . "</STRONG>\n";

-- 
Attila Nagy                                   e-mail: Attila.Nagy@fsn.hu
Free Software Network (FSN.HU)           phone @work: +361 210 1415/127
ISOs: http://www.fsn.hu/?f=download            cell.: +3630 306 6758



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
--
squirrelmail-devel mailing list
List Address: squirrelmail-devel@lists.sourceforge.net
List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=7139
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic