New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed page ID for IIS 7 (no semicolon necessary) #84
Conversation
…ersions of IIS, semicolon is displayed as is, not URL-encoded.
I wonder if IIS ever was affected by this problem. I only ever tested this with Apache on Windows. I'd apply this patch but don't like that this needs to be adjusted for every upcoming release of IIS. Eg. the current implementation wouldn't work on IIS 8. Would be great if someone could check if colons in URLs work in lower versions of IIS. Then we could simply check for the server name. |
I was not sure if that block was specifically for IIS (and maybe for some specific version of it) so I added a "safe" modification but I agree, it's not nice to ask for a specific version number. I can't confirm if DokuWiki runs fine on IIS 6 at its current version but I can definitely confirm that it used to, with colons and not semicolons. I was actually quite surprised when I installed DokuWiki after not using it in ~2 years and there were semicolons everywhere. |
I'll check it for the IIS 6 version. What should I explicitly check? If the IIS 6 runs fine with this commit applied? |
@lupo49 run an unmodified dokuwiki (no additional config settings after install.php) and create a link to a page in a sub namespace. Eg. [[foo:bar]] it should link to foo;bar. Now apply the patch above (without any version checking) and make sure the page got recached. It should now link to foo:bar. Check if this link works or results in an error message. |
Or easier: Just check with the elseif completely removed. |
Will do in calendar week 28. |
If I link to [[foo:bar]] on an IIS 6 (Windows Server 2003) with DokuWiki 2012-07-13 release the links references to http://localhost/dokuwiki/doku.php?id=foo:bar. There's no semicolon, do I have to change something first? Will check with IIS 7 now. |
Same behavior on an IIS 7 (IIS 7.5, Windows Server 2008) with same DW version. |
You need to test with |
Ok, userewrite is set to "DokuWiki internal". Behavior without the patch: With patch: |
@lupo49, can you please also test without the version checking like @splitbrain said? That means you can just comment all of the elseif, so only test the if, without anything below. |
Works also, both links (II6/IIS7) reference to http://localhost/dokuwiki/doku.php/ns1:page1 Code:
|
Great, thanks. |
Just for the record, on my windows setup (I'm using "Uniform Server" 7.0.0 on Windows 7), I get a 403 error without the else case. ("You don't have permission to access /foo:bar on this server.") Judging from Andi's comment, that was the reason why he put it there in the first place. Not sure if this only happens with "unprofessional" servers? |
I could set up a remote control tool on the system where the IIS is running, if someone would like to check it again? It would be better to double check before the patch become applied in the stable tree and causes bumpy productive DokuWiki instances. |
Judging from the test results it seems only Apache does not allow colons in URLs. Or it might be some webservers allow it, some don't. I guess the safer way is to whitelist servers that allow it. For now that's IIS only. Other servers would need to be tested. |
Just upgraded to Adora Belle and noticed that my URLs are still being overwritten to the ones with semicolon. FYI, the fix proposed in this pull request still works, maybe it should even be enhanced of the version 8 of IIS that shipped as part of Windows Server 2012 this summer. |
What happens with this commit? i cannot find it in the backlog of More, i think this issue samuelet/indexmenu#68 is affected by missing |
Restores vanished changes of #84
No description provided.