Fossil SCM

Make sure login_cookie_name() always returns a non-NULL answer, even if it does not know the answer.

drh 2014-11-04 13:28 trunk
Commit c96b12dd5e7d061bb89ecddc3ddad99654a109f2
1 file changed +1 -1
+1 -1
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
9494
" FROM config"
9595
" WHERE name IN ('project-code','login-group-code')"
9696
" ORDER BY name /*sort*/"
9797
);
9898
}
99
- return zCookieName;
99
+ return zCookieName ? zCookieName : "unknown";
100100
}
101101
102102
/*
103103
** Redirect to the page specified by the "g" query parameter.
104104
** Or if there is no "g" query parameter, redirect to the homepage.
105105
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
94 " FROM config"
95 " WHERE name IN ('project-code','login-group-code')"
96 " ORDER BY name /*sort*/"
97 );
98 }
99 return zCookieName;
100 }
101
102 /*
103 ** Redirect to the page specified by the "g" query parameter.
104 ** Or if there is no "g" query parameter, redirect to the homepage.
105
--- src/login.c
+++ src/login.c
@@ -94,11 +94,11 @@
94 " FROM config"
95 " WHERE name IN ('project-code','login-group-code')"
96 " ORDER BY name /*sort*/"
97 );
98 }
99 return zCookieName ? zCookieName : "unknown";
100 }
101
102 /*
103 ** Redirect to the page specified by the "g" query parameter.
104 ** Or if there is no "g" query parameter, redirect to the homepage.
105

Keyboard Shortcuts

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