- Timestamp:
- 2009-10-08T18:32:03+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/recpt/authenaction.cpp
r15589 r20798 154 154 // no need to go further unless authentication is 155 155 // required by this page 156 if (args["uan"].empty()) return true; 156 if (args["uan"].empty()) { 157 return true; 158 } 157 159 158 160 // failure means we have to redirect to this action to get authentication … … 169 171 // do any authentication 170 172 args_ua.clear(); // default = false; 171 if (args_un.empty() || args_pw.empty()) args_us = "invalid"; 172 else args_us = "failed"; 173 if (args_un.empty() || args_pw.empty()) { 174 args_us = "invalid"; 175 } 176 else { 177 args_us = "failed"; 178 } 173 179 174 180 // make sure we have a username … … 177 183 if (!args_pw.empty()) { 178 184 // we are authenticating using a password 179 if (user_database->check_passwd (thisuser.username, args_pw) == ERRNO_SUCCEED) args_ua = "1"; // succeeded 185 if (user_database->check_passwd (thisuser.username, args_pw) == ERRNO_SUCCEED) { 186 args_ua = "1"; // succeeded 187 } 180 188 181 189 } else if (!args_ky.empty()) { 182 190 // we are authenticating using a key 183 if (key_database->check_key(thisuser, args_ky, args_ug, keydecay)) args_ua = "1"; 184 else args_us = "stalekey"; 191 if (key_database->check_key(thisuser, args_ky, args_ug, keydecay)) { 192 args_ua = "1"; 193 } 194 else { 195 args_us = "stalekey"; 196 } 185 197 } 186 198 } … … 197 209 if (!args_ug.empty()) { 198 210 199 // Since we rec ieve a comma seperated list211 // Since we receive a comma separated list 200 212 // of groups like mygroup,yourgroup,ourgroup 201 213 // we want to split them into individual groups … … 261 273 // need to save the current arguments in "er" 262 274 text_t &arg_er = args["er"]; 263 if (!compress_save_args(argsinfo, saveconf, args, arg_er, outconvert, logout)) 275 if (!compress_save_args(argsinfo, saveconf, args, arg_er, outconvert, logout)) { 264 276 arg_er.clear(); 277 } 265 278 266 279 // needs to be decoded for use within forms
Note:
See TracChangeset
for help on using the changeset viewer.