Have your site setup in http://localhost/~/whatever/
this will make the base64 encoded return urls start with aHR0cDovL2xvY2FsaG9zdC9+
Create a category list menu item
log in frontend with admin. go to that menu item. Click on new button to create a new article. Then, click on cancel, or fill the form and submit
after cancelling/creation, you should be redirected to category list menu item
you are redirected to home page, because of 2 problems:
So, finally, when we cancel or submit, the controller will fail when parsing the return url, and redirect to home page as a fallback.
joomla 3.8.3, but happens to previous versions as well
It's probably not a good idea to have the return url in get requests anyway, but still should be fixed.
Another solution for cleaner and safer redirect would be to store the actual return url in a session var, and use an uniqid as the key to pass to get/post request and recover the value:
$returnToken = uniqid();
JFactory::getApplication()->setUserState($returnToken, $realUrl);
$append .= '&return=' . $returnToken;
yes, but is it the only case where you can obtain a '+' in the resulting base64 encoded url ?
if that happens ONLY when using unsafe characters, then ok...
Status | New | ⇒ | Discussion |
Maybe we should switch to use base64url
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-28 14:04:04 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19130
@julienV I created a patch for your issue at #19196.
Can you test it and add a test result at issues.joomla.org/joomla-cms/19196
The problem is that you have a ~ in the path
That is an unsafe character to have in a url see
https://perishablepress.com/stop-using-unsafe-characters-in-urls/