forked from jakobadam/RDSFactor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When first accessing the RD Web site root, the client will be redirected several times and eventually end up at login.aspx with a ReturnUrl set. The page rewrote the ReturnUrl so that the actual query string used in the posted form targeted tokenform.aspx, but in this case login.aspx failed to set some session variables required by tokenform.aspx, so it would immediately redirect to logoff, and then you would end up at login.aspx again, this time without a ReturnUrl. A new attempt to login would work, because without the ReturnUrl set, the session parameter would be prepared properly. This is fixed by: * Don't rewrite the ReturnUrl before it's used in the form action attribute. This has the benefit that it preserves the true ReturnUrl through the whole login procedure. * After successful phase-1 authentication, if 2FA is active, login.aspx will now always set the required parameters and redirect to tokenform.aspx, regardless of any ReturnUrl. But if specified, it will be passed to along to tokenform.aspx. * After successful phase-2 authentication in tokenform.aspx, redirect to ReturnUrl if specified, instead of always forcing Default.aspx.
- Loading branch information
Showing
2 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters