[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2011-11-20 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

Roan Kattouw roan.katt...@gmail.com changed:

   What|Removed |Added

   Keywords|need-review |reviewed
 CC||roan.katt...@gmail.com

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2011-05-14 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

Bryan Tong Minh bryan.tongm...@gmail.com changed:

   What|Removed |Added

 CC||bryan.tongm...@gmail.com

--- Comment #13 from Bryan Tong Minh bryan.tongm...@gmail.com 2011-05-14 
14:33:13 UTC ---
If I understand correctly, we only need to encode the colon if a special
character is present? A quick fix would be /[A-Za-z0-9]*/.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

Lisa Ridley lhrid...@gmail.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #8 from Lisa Ridley lhrid...@gmail.com 2010-03-04 22:26:55 UTC ---
Microsoft has confirmed that this is a bug in IIS 7.5

http://forums.iis.net/p/1165517/1936321.aspx#1936321

I am reopening this bug.  The fix that was implemented in r63228 encodes all
occurrences of the colon in the title parameter of a url.

This is not needed except in cases where there are certain special characters
preceding the URL.  However since it appears to be picking the characters at
random to apply what looks like punycoding to the URL, I am in favor of
encoding the colon when there is any special character preceding the colon. 
But encoding all of them may be a bit of overkill.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

p858snake p858sn...@yahoo.com.au changed:

   What|Removed |Added

   Keywords||need-review, patch,
   ||upstream
 CC||p858sn...@yahoo.com.au

--- Comment #10 from p858snake p858sn...@yahoo.com.au 2010-03-05 00:14:52 UTC 
---
+upstream
this is a issue with iis according to that forum report, although we can still
patch around it.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #11 from Lisa Ridley lhrid...@gmail.com 2010-03-05 01:24:18 UTC 
---
Yes.  It only fails if the special character falls before the colon.  URL
parameter strings with no colon, or with special characters only after the
colon appear to be fine.

This appears to occur primarily with lower case latin extended character, lower
case cyrillic and some lower case greek characters (at least that's what I've
identified so far).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-04 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #12 from Lisa Ridley lhrid...@gmail.com 2010-03-05 01:24:39 UTC 
---
Yes.  It only fails if the special character falls before the colon.  URL
parameter strings with no colon, or with special characters only after the
colon appear to be fine.

This appears to occur primarily with lower case latin extended character, lower
case cyrillic and some lower case greek characters (at least that's what I've
identified so far).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #2 from Lisa Ridley lhrid...@gmail.com 2010-03-03 08:36:40 UTC ---
A possible fix for this issue is as follows:

Change the global function wfUrlencode() to the following:

function wfUrlencode( $s ) {
$s = urlencode( $s );
$s = str_ireplace(
array( '%3B','%3A','%40','%24','%21','%2A','%28','%29','%2C','%2F' ),
array(   ';',  ':',  '@',  '$',  '!',  '*',  '(',  ')',  ',',  '/' ),
$s
);

## check to see if server is running Microsoft IIS 7 or greater; if so
converts colons back to url encoded values
if(isset($_SERVER['SERVER_SOFTWARE'])) {
$server = explode(/, $_SERVER['SERVER_SOFTWARE']);
if($server[0] == Microsoft-IIS 
($server[1]=='7'||$server[1]=='7.5')) {
if(!(strpos($s, '%')===false)) {
$s = str_ireplace(array(':'), array('%3A'), $s);
}
}
}
return $s;
}

I have tested this a preliminarily it appears to hae some promise.  I want to
make sure that IIS always sets a value for $_SERVER['SERVER_SOFTWARE'] before
creating a patch and/or modifying trunk.

Another option would be to exclude colons from the str_ireplace() process in
wfUrlencode() for all browsers; however, this would result in an encoded
character for the colon in every instance, which is probably not a desired
behavior since this really only comes into play when there are special
characters in the title prefix.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #3 from Lisa Ridley lhrid...@gmail.com 2010-03-03 18:28:00 UTC ---
Revision to the fix above:

function wfUrlencode( $s ) {
$s = urlencode( $s );
$s = str_ireplace(
array( '%3B','%3A','%40','%24','%21','%2A','%28','%29','%2C','%2F' ),
array(   ';',  ':',  '@',  '$',  '!',  '*',  '(',  ')',  ',',  '/' ),
$s
);

## check to see if server is running Microsoft IIS 7 or greater; if so
converts colons back to url encoded values
if(isset($_SERVER['SERVER_SOFTWARE'])) {
$match = preg_match('|(Microsoft-IIS/7)|', $_SERVER['SERVER_SOFTWARE'],
$a);
if($match  0) {
if(!(strpos($s, '%')===false)) {
$s = str_ireplace(array(':'), array('%3A'), $s);
}
}
}
return $s;
}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

Platonides platoni...@gmail.com changed:

   What|Removed |Added

 CC||platoni...@gmail.com

--- Comment #4 from Platonides platoni...@gmail.com 2010-03-03 18:39:27 UTC 
---
Does it also fail when the domain name has a dot?

From earlier reports it seems that IIS gets confused when the domain does not
contain a dot (eg. localhost) and there's a colon in the url.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-03 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #5 from Lisa Ridley lhrid...@gmail.com 2010-03-03 18:42:00 UTC ---
Yes.  I've tested this using http://localhost and using http://www.example.com
(setting the domain name in the hosts file).

I don't have an internet accessible server with Windows so I haven't tested
this on an actual web-accessible server, just in a local test environment.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

p858snake p858sn...@yahoo.com.au changed:

   What|Removed |Added

 Blocks||22710

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 22709] IIS7.5 is mishandling redirects generated by OutputPage::output() when the URL contains special characters

2010-03-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=22709

--- Comment #1 from Lisa Ridley lhrid...@gmail.com 2010-03-03 05:44:22 UTC ---
Update:

Using a URL redirect where the colon is encoded as well is accepted by IIS7.5
and redirects to the appropriate page within MediaWiki.

For example, changing wfUrlencode() so that the colon symbol is excluded from
the call to str_ireplace() in wfUrlencode() will result in an encoded URL:

http://localhost/w/index.php?title=%C3%81%3A%C3%A1

which is accepted by IIS7.5 and redirected properly rather than generating a
404.0 error; the resulting MediaWiki page that is presented to the user has the
correctly formatted title; however the parameters in the url are fully encoded.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
You are on the CC list for the bug.

___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l