Fossil SCM

Fix a possible redirect loop.

drh 2010-11-01 23:38 trunk
Commit f4033ec09ee6bb2a73fa588c217527a1f311bd27
1 file changed +1 -1
+1 -1
--- src/wiki.c
+++ src/wiki.c
@@ -86,14 +86,14 @@
8686
if( !g.okRdWiki ){
8787
cgi_redirectf("%s/login?g=%s/home", g.zBaseURL, g.zBaseURL);
8888
}
8989
if( zIndexPage ){
9090
const char *zPathInfo = P("PATH_INFO");
91
+ while( zIndexPage[0]=='/' ) zIndexPage++;
9192
if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
9293
}
9394
if( zIndexPage ){
94
- while( zIndexPage[0]=='/' ) zIndexPage++;
9595
cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
9696
}
9797
if( zPageName ){
9898
login_check_credentials();
9999
g.zExtra = zPageName;
100100
--- src/wiki.c
+++ src/wiki.c
@@ -86,14 +86,14 @@
86 if( !g.okRdWiki ){
87 cgi_redirectf("%s/login?g=%s/home", g.zBaseURL, g.zBaseURL);
88 }
89 if( zIndexPage ){
90 const char *zPathInfo = P("PATH_INFO");
 
91 if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
92 }
93 if( zIndexPage ){
94 while( zIndexPage[0]=='/' ) zIndexPage++;
95 cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
96 }
97 if( zPageName ){
98 login_check_credentials();
99 g.zExtra = zPageName;
100
--- src/wiki.c
+++ src/wiki.c
@@ -86,14 +86,14 @@
86 if( !g.okRdWiki ){
87 cgi_redirectf("%s/login?g=%s/home", g.zBaseURL, g.zBaseURL);
88 }
89 if( zIndexPage ){
90 const char *zPathInfo = P("PATH_INFO");
91 while( zIndexPage[0]=='/' ) zIndexPage++;
92 if( strcmp(zIndexPage, zPathInfo)==0 ) zIndexPage = 0;
93 }
94 if( zIndexPage ){
 
95 cgi_redirectf("%s/%s", g.zBaseURL, zIndexPage);
96 }
97 if( zPageName ){
98 login_check_credentials();
99 g.zExtra = zPageName;
100

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button