{
const char *const *tmp;
+ if (*realm == '\0')
+ return TRUE;
+
for (tmp = auth_realms; *tmp != NULL; tmp++) {
if (strcasecmp(realm, *tmp) == 0)
return TRUE;
copy++;
}
- if (!auth->nonce_found) {
- *error = "Missing nonce parameter";
- failed = TRUE;
- } else if (auth->cnonce == NULL) {
- *error = "Missing cnonce parameter";
- failed = TRUE;
- } else if (auth->username == NULL) {
- *error = "Missing username parameter";
- failed = TRUE;
+ if (!failed) {
+ if (!auth->nonce_found) {
+ *error = "Missing nonce parameter";
+ failed = TRUE;
+ } else if (auth->cnonce == NULL) {
+ *error = "Missing cnonce parameter";
+ failed = TRUE;
+ } else if (auth->username == NULL) {
+ *error = "Missing username parameter";
+ failed = TRUE;
+ }
}
if (auth->nonce_count == NULL)