sbrl / Pepperminty-Wiki

A wiki in a box
https://peppermint.mooncarrot.space/
Mozilla Public License 2.0
180 stars 22 forks source link

After logging out, if you use the wrong link to login again, you are logged out... again #143

Closed ikisler closed 7 years ago

ikisler commented 7 years ago

Found a funny edge case...

Steps:

  1. While logged in, click the logout link
  2. Click the top Login button (not the link in the message)
  3. Log back in --> BOOM! Logged out again.

I assume the problem is that the returnto points to the logout link: index.php?action=login&returnto=%2FPepperminty-Wiki%2Fbuild%2Findex.php%3Faction%3Dlogout

sbrl commented 7 years ago

Oh, man! That shouldn't happen :P I'll take a look at this.

sbrl commented 7 years ago

Looks like the issue is on https://github.com/sbrl/Pepperminty-Wiki/blob/master/core.php#L1206.

Since it's a generic url here, it'll require some fiddling I think.

sbrl commented 7 years ago

All fixed! After thinking about it for a bit I came up with a rather neat solution :smiley_cat: