Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Redirect to admin login if the pages have a <form> which uses method="GET"


minipassat

Recommended Posts

Hello,

 

Did anyone have this issue before? I am using OSC RC2a version and recently I installed two modules, "Export Orders to CSV" and "Order Number in Admin Order List". Both module use method="GET" for the <form>. I was redirected to the admin login page when I click the button or links. I noticed that the osCAdminID number was changed when it's being redirected. I found this post but it doesn't seem to fix my problem. Can anyone help please?! Thank you!!

 

Login redirect to origin after admin session expired doesn't work for PHP < 5

 

Symptom: The basic redirect works, but it forgets all GET parameters (we may end up on a completely different configuration page for instance).

 

Reason: The PHP < 5 replacement for http_build_query in admin/includes/functions/compability.php which is used by admin/login.php to re-create the GET parameters is a mess (sorry, but it really looks as if it has never been tested).

 

Fix:

 

Replace $separator with $arg_separator (or the other way round) within the whole function.

 

Replace

 

if ( !is_array($formdata) || !empty($formdata) ) {

return false;

}

 

with

 

if ( !is_array($formdata) || empty($formdata) ) {

return false;

}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...