Subversion Repositories oidplus

Rev

Rev 1099 | Rev 1107 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1099 Rev 1106
Line 204... Line 204...
204
                }
204
                }
205
 
205
 
206
                if (!is_array($cfgData)) {
206
                if (!is_array($cfgData)) {
207
                        $passwordDataArray = array($cfgData);
207
                        $passwordDataArray = array($cfgData);
208
                } else {
208
                } else {
209
                        $passwordDataArray = $cfgData;
209
                        $passwordDataArray = $cfgData; // Multiple Administrator passwords
210
                }
210
                }
211
 
211
 
212
                foreach ($passwordDataArray as $passwordData) {
212
                foreach ($passwordDataArray as $passwordData) {
213
                        if (strpos($passwordData, '$') !== false) {
213
                        if (strpos($passwordData, '$') !== false) {
214
                                if ($passwordData[0] == '$') {
214
                                if ($passwordData[0] == '$') {
215
                                        // Version 3: BCrypt
215
                                        // Version 3: BCrypt
216
                                        return password_verify($password, $passwordData);
216
                                        if (password_verify($password, $passwordData)) return true;
217
                                } else {
217
                                } else {
218
                                        // Version 2: SHA3-512 with salt
218
                                        // Version 2: SHA3-512 with salt
219
                                        list($s_salt, $hash) = explode('$', $passwordData, 2);
219
                                        list($s_salt, $hash) = explode('$', $passwordData, 2);
220
                                }
220
                                }
221
                        } else {
221
                        } else {