Fossil SCM
Make sure login_cookie_name() always returns a non-NULL answer, even if it does not know the answer.
Commit
c96b12dd5e7d061bb89ecddc3ddad99654a109f2
Parent
de17e35bf12a858…
1 file changed
+1
-1
+1
-1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -94,11 +94,11 @@ | ||
| 94 | 94 | " FROM config" |
| 95 | 95 | " WHERE name IN ('project-code','login-group-code')" |
| 96 | 96 | " ORDER BY name /*sort*/" |
| 97 | 97 | ); |
| 98 | 98 | } |
| 99 | - return zCookieName; | |
| 99 | + return zCookieName ? zCookieName : "unknown"; | |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /* |
| 103 | 103 | ** Redirect to the page specified by the "g" query parameter. |
| 104 | 104 | ** Or if there is no "g" query parameter, redirect to the homepage. |
| 105 | 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; |
| 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 |