Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

Logout error #92

Open
ptrsmk opened this issue Feb 14, 2014 · 8 comments
Open

Logout error #92

ptrsmk opened this issue Feb 14, 2014 · 8 comments

Comments

@ptrsmk
Copy link

ptrsmk commented Feb 14, 2014

I have verified that this occurs when Persona is the only activated plugin, and it does not occur when I deactivate Persona.

When I click the Logout link in the Admin bar, I am brought to a page that says:

You are attempting to log out of [site name]

Do you really want to log out?

The url for the page is:

wp-login.php?action=logout&_wpnonce=1f9f2cae2a
@krydos
Copy link
Contributor

krydos commented Feb 15, 2014

Hello @dvrcthewrld :) It's looks like regular wordpress confirmation. Do you think will be better without it?

@ptrsmk
Copy link
Author

ptrsmk commented Feb 16, 2014

It is a confirmation generated by WordPress; that is true. However, it is not supposed to show up, which is why it doesn't appear on a fresh install. It is related to a deprecated logout procedure.

@shane-tomlinson
Copy link
Owner

@dvrcthewrld - I have not been able to figure out how to disable that message, any ideas? @krydos?

@krydos
Copy link
Contributor

krydos commented Feb 17, 2014

@shane-tomlinson I did a little research for this issue and found something. This page shows when logout link looks like

    <a href="/wp-login.php?action=logout">Logout</a>

"manual logout". It's not a good way. It's not a wordpress way. So wordpress did a wp_logout_url() function for this purpose which adds new parameter _wpnonce. And if logout url contains _wpnonce then this confirmation page should not be displayed.

But I also found that you, @shane-tomlinson, use this function in this plugin. So all should be alright. But it's not. I have no ideas. I think need more research. Maybe it's related with JS logout. I will do research again when I get a free time. If you not mind of course :)

@shane-tomlinson
Copy link
Owner

Thanks for the research @krydos! No pressure, I'll try to have a look too!

@krydos
Copy link
Contributor

krydos commented Feb 17, 2014

What I found... We have this problem because we use JS logout.

We can add wp_logout_url() to the href of admin logout link (lib/browserid-admin.php:99) and remove event.preventDefault() from browserid.js:42 and remove urlLogoutRedirect from browserid.js:214,215.

I fix it in my branch bug92... But I'm not sure that it's a good fix because I found the comment about bug in Chrome at the browserid.js:214,215. I checked wordpress logout and it works in the last Firefox and last Chromium. Also I don't know what compress tool you use for javascript compression so I used Minify Javascript Online :)

@shane-tomlinson, do you not mind if I make pull request and if something wrong you decline it, ok?

@shane-tomlinson
Copy link
Owner

@krydos - I'm never going to say no to a pull request!

krydos added a commit to krydos/browserid-wordpress that referenced this issue Mar 15, 2014
@kitchin
Copy link

kitchin commented Mar 20, 2015

This fix did not make it into version 0.50. To test it, install 0.50 and then download a zip by going to one of the two "fix logout error issue #92" links above. The two zips are identical except for the minification. They are built on version 0.49.

From the zip, upload only these three files:

browserid/lib/browserid-admin.php
browserid/browserid.min.js
browserid/browserid.js

Doing it this way instead of installing the zip should keep WP for prompting for an update 0.49 -> 0.50, and you will have the compiled language files (.mo).

I'm testing to see if fix #92 resolves a conflict with the plugin Limit Login Attempts. We get into an endless cycle where it is impossible to login.

shane-tomlinson pushed a commit that referenced this issue Jul 3, 2015
fix logout error issue #92
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants