[Dovecot, Web] Fix remaining issues of app password enhancements from #4296

This commit is contained in:
andryyy
2021-10-30 14:34:33 +02:00
parent 644b1f85d1
commit f0aae22f77
3 changed files with 7 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ elseif (isset($_GET['login'])) {
$stmt = $pdo->prepare("REPLACE INTO sasl_log (`service`, `app_password`, `username`, `real_rip`) VALUES ('SSO', 0, :username, :remote_addr)");
$stmt->execute(array(
':username' => $login,
':remote_addr' => $_SERVER['REMOTE_ADDR']
':remote_addr' => ($_SERVER['HTTP_X_REAL_IP'] ?? $_SERVER['REMOTE_ADDR'])
));
// redirect to sogo (sogo will get the correct credentials via nginx auth_request
header("Location: /SOGo/so/${login}");