osHelpers - Help for your osCommerce store
 
Google Base Feed Germany
iFrame Defender v1.2
oscommerce Seo
  Seo Pack 2
  SE Friendly URLs
  Session ID Removal
  Title and Meta Tags
  Google Sitemap
Magnum Shopping Cart
  Magnum MVS 8.4 Basic
osCommerce Services
  osc / cre patch
  Data Entry
  Data Extraction
  bugs and fixing
  Site Transfer
  creloaded Transfer
  Design Special
  Hosting
osCommerce Templates
osCommerce Contributions
  Credit Modules
  Features
  Images
  InfoBoxes
  Languages
  Order Total Modules
  Other
  Payment Modules
  Reports
  Shipping Modules
  Templates/Themes
  Zones
osCommerce Articles
osCommerce Tutorials
  Installing osCommerce
  Configuring your store
  Adding categories
  Adding products
  Adding product attributes
  Configuring currency
  Adding payment modules
  Adding shipping modules
  Configuring sales tax
  Editing your home page
  Editing columns
  Editing header and footer
  Creating specials
  Managing customers
  Sending out a newsletter
  Sending out email
  Managing your banners
  Backup database
CRELoaded Tutorials
  Add Administrators
  Add Article Author
  Additional Images
  Create a New Page
  Define Mainpage
  Disable cc Encryption
  Disable Company Field
  Disable Country
  Disable Date of Birth
  Display broken images
  Easypopulate Export
  Email confirmation
  Insert Faq
  Max Package Weight
  Require Terms of Use
  Affiliate Newsletter
  Enable Cache
CB Power Affiliate
Tell A Friend
 

Tell someone you know about this product.

   OSHELPERS | OSCOMMERCE CONTRIBUTIONS | OTHER | 4280   


oscommerce SecurityFixforlogoff.php
[4280]
 
 
box_bg_l.gif.
"This has been bothering me for ages.

There is a glitch in the log off system of osc that allows a person to click the back button on a browser and reload the last expired page .. which could be something private like account details page or something. They can see a persons account info etc.

The default osc logoff.php just needs a small piece of code added to destroy and redirect / refresh the logout page once so that if the back button is clicked the logout page will stay locked in a loop and will not go back to any previous cached page history.

IN catalog/logoff.php near the top FIND:

require('includes/application_top.php');


JUST BELOW it ADD this code:

// BEGIN LOGOFF BACK BUTTON SECURITY FIX
// Do not let the customer use back button or refresh to go back after logoff
if (tep_session_is_registered('customer_id')) {
//$navigation->set_snapshot();
tep_session_destroy(); // disabled above line and changed to destroy so cannot hit back button and see potentially private info
tep_redirect(tep_href_link(FILENAME_LOGOFF, '', 'SSL')); // changed to FILENAME_LOGOFF instead of FILENAME_DEFAULT ... lock in loop
}
// END LOGOFF BACK BUTTON SECURITY FIX

Now if say someone leaves their browser open and someone else comes along and hits the back button to Snoop! ... no matter how many times they click it ... the Logoff Page just refreshes itself beacuse the session is permanently destroyed and the page is telling itself not to do anything but refresh or allow them to continue on somewhere else.

NOTE: No file attached"

 


For more information, visit the official osCommerce contribution webpage.
box_bg_r.gif.
 

osHelpers

osHelpers