Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with FORCE_SSL_LOGIN and FORCE_SSL_ADMIN #9

Closed
bmaupin opened this issue Dec 14, 2011 · 0 comments
Closed

Problems with FORCE_SSL_LOGIN and FORCE_SSL_ADMIN #9

bmaupin opened this issue Dec 14, 2011 · 0 comments

Comments

@bmaupin
Copy link
Contributor

bmaupin commented Dec 14, 2011

I'm no expert on these things, so I may not be right about this, but there seem to be two problems with the plugin, caused by the same part of code (line 208 of sidebar-login.php):

  1. If you define FORCE_SSL_ADMIN as true in wp-config.php, logging in using the sidebar login from a non-SSL url will fail because admin_url('admin-ajax.php') will generate an https url, and the browser will block this as a cross-domain POST.

  2. If you define FORCE_SSL_LOGIN as true in wp-config.php, logging in using the sidebar login from a non-SSL url will cause an insecure login because admin_url('admin-ajax.php') will generate a non-SSL http url.

    Simply forcing this to https using admin_url('admin-ajax.php', 'https') will fail for the same reasons as the first problem.

My first thought for a solution was the sidebar-login plugin could reload the page as https if either one of those constants is defined. I saw some other possible solutions here:

http://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript

...not sure where you want to go with this or I would have coded a solution myself.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants