(string $username, string $password)
| 283 | } |
| 284 | |
| 285 | public static function authenticateWebDav(string $username, string $password): bool |
| 286 | { |
| 287 | $user = self::authenticate($username, $password); |
| 288 | if ($user === false) { |
| 289 | return false; |
| 290 | } |
| 291 | if (!empty($user['totp_secret'])) { |
| 292 | error_log('FileRise: denied WebDAV password-only login for TOTP-enabled user ' . self::sanitizeLogValue($username, 80)); |
| 293 | return false; |
| 294 | } |
| 295 | return true; |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * Loads failed login attempts from a file. |
no test coverage detected