mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
42581dfe93
In order to redirect the user after authentication, Authelia uses rd query parameter provided by the proxy. However an attacker could use phishing to make the user be redirected to a bad domain. In order to avoid the user to be redirected to a bad location, Authelia now verifies the redirection URL is under the protected domain.
18 lines
665 B
TypeScript
18 lines
665 B
TypeScript
import WithDriver from '../helpers/with-driver';
|
|
import fullLogin from '../helpers/full-login';
|
|
import loginAndRegisterTotp from '../helpers/login-and-register-totp';
|
|
|
|
describe("Connection retry when mongo fails or restarts", function() {
|
|
this.timeout(30000);
|
|
WithDriver();
|
|
|
|
it("should be able to login after mongo restarts", function() {
|
|
const that = this;
|
|
let secret;
|
|
return loginAndRegisterTotp(that.driver, "john", true)
|
|
.then(_secret => secret = _secret)
|
|
.then(() => that.environment.restart_service("mongo", 1000))
|
|
.then(() => fullLogin(that.driver, "https://admin.example.com:8080/secret.html", "john", secret));
|
|
})
|
|
});
|