Issue with redirect to specific login
-
HI there
Ok, SO we have some sites where we want to force everyone to login,
SO use your plugin, the login screen shows up ok, but then the redirect is not working properly…
I added this code to the function.php, but I then get an error page as it does this
SO this is code in function.php
/** * Set the URL to redirect to on login. * * @param string $url The visited URL. * @return string The URL to redirect to on login. Must be absolute. */ function my_forcelogin_redirect( $url ) { return home_url( 'https://blueskycreative.co.uk/' ); } add_filter( 'v_forcelogin_redirect', 'my_forcelogin_redirect' );
But when I try and login it does this and sends me here
blueskycreative.co.uk/https:/blueskycreative.co.uk/
which then throws a 404 ? What am I doing wrong?
We were told of a vulnerability and thought this would fix it lol
“The vulnerability, an Open HTTP Redirect, is a way to redirect users away from the real website
and onto one controlled by the attacker, usually without the victim being away of the move. A
proof-of-concept has been developed for this specific instance which would allow an attacker to steal user
login credentials in a way which would appear to be a normal part of the login process. The fix for this issue
is relatively simple and implementing it is unlikely to affect normal operations of the site.The login system suffers from an Open HTTP Redirect vulnerability as the “redirect_to” parameter passed
to the page is not validated before being used and so can be set to a fully qualified URL which takes the
user away from the real site and onto one controlled by the attacker. This can then be used to capture
login credentials or perform other attacks against the user.
Parameters used for redirection should always be checked to ensure they only allow a user to be taken
to pages or domains which are authorised by the site. This is usually done by restricting them to relative
URLs only and so blocking fully and protocol relative URLs.”
- The topic ‘Issue with redirect to specific login’ is closed to new replies.