Created
April 23, 2018 15:40
-
-
Save ywatase/570abeb73c0c9878d921dd85ce3a4b8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -N -u wiki.cgi.old wiki.cgi | |
--- wiki.cgi.old 2012-11-13 18:47:10.000000000 +0900 | |
+++ wiki.cgi 2018-04-24 00:18:18.000000000 +0900 | |
@@ -83,6 +83,14 @@ | |
} | |
#============================================================================== | |
+ # Redirect if URI is escaped twice and pointed page exists. | |
+ #============================================================================== | |
+ if (not $wiki->page_exists($cgi->param('page')) | |
+ and $wiki->page_exists(Util::url_decode($cgi->param('page')))) { | |
+ $wiki->redirect(Util::url_decode(Util::url_decode($cgi->param('page')))); | |
+ } | |
+ | |
+ #============================================================================== | |
# 設定を反映(もうちょっとスマートにやりたいね) | |
#============================================================================== | |
my $config = &Util::load_config_hash($wiki,$wiki->config('config_file')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment