  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: create_account.php 1840 2008-12-12 12:32:40Z hpdl $ |
| |
| 3 | + | $Id: create_account.php 1843 2008-12-12 13:32:10Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
16 | 16 | | require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CREATE_ACCOUNT); |
| |
17 | 17 | | |
| |
18 | 18 | | $process = false; |
  |
19 | | - | if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process')) { |
| |
| 19 | + | if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) { |
|
20 | 20 | | $process = true; |
| |
21 | 21 | | |
| |
22 | 22 | | if (ACCOUNT_GENDER == 'true') { |
| |
|
|
 |
… |
|
226 | 226 | | tep_session_register('customer_country_id'); |
| |
227 | 227 | | tep_session_register('customer_zone_id'); |
| |
228 | 228 | | |
  |
| 229 | + | // reset session token |
| |
| 230 | + | $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); |
| |
| 231 | + | |
|
229 | 232 | | // restore cart contents |
| |
230 | 233 | | $cart->restore_contents(); |
| |
231 | 234 | | |
| |
|
|
 |
… |
|
274 | 277 | | <!-- left_navigation_eof //--> |
| |
275 | 278 | | </table></td> |
| |
276 | 279 | | <!-- body_text //--> |
  |
277 | | - | <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| |
| 280 | + | <td width="100%" valign="top"><?php echo tep_draw_form('create_account', tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onSubmit="return check_form(create_account);"', true) . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> |
  |
278 | 281 | | <tr> |
| |
279 | 282 | | <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> |
| |
280 | 283 | | <tr> |