Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

security issues with URL's


vinnie@krystal

Recommended Posts

Posted

Hi Everyone, I have had a problem with security issues with my shop. i have created a login page which works fine. The problem here is how do i overcome when once the user has logged in they are able to copy the URL link and are able to bypass the login page by pasting the URL in the address bar.

 

What i am looking for is by some how a default where they are returned back to login page and cannot access the shop until they complete login.

 

Anyone have any idea how this may be acheived? many thanks if you able to help...

Posted

once the user has logged in they are able to copy the URL link and are able to bypass the login page by pasting the URL in the address bar.

 

You can clean the query string with security pro, find details of that & other security measures here.

 

If you have register_globals set to on it allows the user to do much with the url, so turn rg off & fix the store so it works that way.

 

 

there is Register Globals Easy http://addons.oscommerce.com/info/5729 or better still Upgrading osC from 2.2 MS2 to 2.2 RC2a http://addons.oscommerce.com/info/6654

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Posted

Hi Everyone, I have had a problem with security issues with my shop. i have created a login page which works fine. The problem here is how do i overcome when once the user has logged in they are able to copy the URL link and are able to bypass the login page by pasting the URL in the address bar.

 

What i am looking for is by some how a default where they are returned back to login page and cannot access the shop until they complete login.

 

Anyone have any idea how this may be acheived? many thanks if you able to help...

Each secure page should have code to verify the user is logged in. Check any of the files that are secure, like create account, and copy the code block that checks if the customer is registered to your new page. When the page is copied, the login status will be checked and you won't be able to continue unless logged in. If the url contains the session ID, then that is a different problem and you need to fix that before anything else.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

hi thats great i thought it would require some sort of verification on each page being visited and so you have confirmed this for me. reference RG being turned on i will check out the link you have provided spooks although i am certain the RG are set to off.

Posted

Try adding this at the top of the pages you need to only have logged in people view. It is the same as on all the SSL pages in osC such as account_edit.php which you can view for a reference.

 

  if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }

Posted

hi i did what you asked and pasted that piece of code into the top page, for some reason i want to revert back to my previuos settings but its now not letting me do that i am just getting a login page...i.e not directed to my index.php.

 

can you help on why that would be..thanks

Posted

I thought you wanted non logged in people to go to your login page. If you want them to be directed to your index.php page instead then it would be

 

  if (!tep_session_is_registered('customer_id')) {
   $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'SSL'));
 }

 

All I have done here is redirect it to a different page.

 

 

If you don't want the added code there, if it is not what you are looking for then you can just remove it and revert your pages back to their original form and it will be as it was before. You might need to refresh your browser.

Posted

what i wanted was to stop any user from copying and then pasting the URL address once they have logged in as for security purposes all they would need to do next time is to bypass my login page by pasting the copied URL in the address bar. I have created my own login page prior to oscommerce store.

 

for some reason it doesnt revert back to default i think it registers it somewhere in the database which didnt allow the revert back

 

if (!tep_session_is_registered('customer_id'))

 

therefore it stores this information and even if you took this code out it creates it as a session.

Posted

The session does expire so it should not allow them to bypass the login after about 10 minutes. Can you test it again and this time empty the sessions table (just empty, don't delete the table) in between your tests.

 

The session that is created stores a lot of info including if the customer is registered. The session should expire in 10 minutes (I think) and then if a person uses it after that time they should get a new session without been registered and therefore be sent back to the login page.

 

What you are doing will also prevent Google and other search engines from indexing your pages so your protected pages will not show up on the search engines.

Posted

what i wanted was to stop any user from copying and then pasting the URL address once they have logged in as for security purposes all they would need to do next time is to bypass my login page by pasting the copied URL in the address bar. I have created my own login page prior to oscommerce store.

As mentioned, it's a non-issue unless your session ID is being copied. If that is the case, you are "fixing" the wrong code.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Archived

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

×
×
  • Create New...