Till Krüss
2013-10-15 910a3581be47da1d19eb15a68ea6b51c2c31ef67
check if password was changed successfully, before looking for error messages
1 files modified
10 ■■■■■ changed files
plugins/password/drivers/domainfactory.php 10 ●●●●● patch | view | raw | blame | history
plugins/password/drivers/domainfactory.php
@@ -54,7 +54,12 @@
                curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
                if ($result = curl_exec($ch)) {
                    // did the new password match the requirements?
                    // has the password been changed?
                    if (strpos($result, 'Einstellungen erfolgreich') !== false) {
                        return PASSWORD_SUCCESS;
                    }
                    // show error message(s) if possible
                    if (strpos($result, '<div class="d-msg-text">') !== false) {
                        preg_match_all('#<div class="d-msg-text">(.*?)</div>#s', $result, $errors);
                        if (isset($errors[1])) {
@@ -66,9 +71,6 @@
                        }
                    }
                    if (strpos($result, 'Einstellungen erfolgreich') !== false) {
                        return PASSWORD_SUCCESS;
                    }
                } else {
                    return PASSWORD_CONNECT_ERROR;