Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / "There was a security error when trying to login" - v1.3.8

"There was a security error when trying to login" - v1.3.8

Views: 96,060

Results 21 to 40 of 140
02 Dec 2007, 14:13
#22
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: "There was a security error when trying to login" - v1.3.8

Adds:

But what do I need to edit in the above files to get this to work?

Just merge all the new changes from the new version of those files into your customized versions of those files.

If you've been doing an upgrade, you're already using some sort of merge/compare tool, right?
Just continue with the rest of your upgrade ... an upgrade doesn't include just updating your "core" files ... you ALSO ALWAYS need to merge all the new changes from the default (template, language, modules, etc) files into your customized versions of those same files. Otherwise you'll be missing features ... such as the one discussed in this thread.

02 Dec 2007, 14:18
#23
adds avatar

adds

Zen Follower

Join Date:
Nov 2005
Posts:
255
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

Adds:

Just see this:

"There was a security error when trying to login"


Situation:
I have just upgraded and now getting this error when trying to login from the customer screen "There was a security error when trying to login"

Cause:
Zen Cart™ v1.3.8 has an added security feature to prevent spoofed external logins. A "security token" field has been added to all login forms. This token must be current (not expired), and must be submitted with login username+password in order for logins to work properly.

Remedy:
If you have customized template "login" files, the new security features need to be merged into your customized template files.

The following files are affected:

  • /includes/templates/YOUR_TEMPLATE/templates/tpl_login_default.php
  • /includes/templates/YOUR_TEMPLATE/templates/tpl_timeout_default.php

And if you're encountering it in your Admin area, this file is affected as well:

  • /admin/login.php

But what do I need to edit in the above files to get this to work?

Issue resolved.

Thanks for the support.

02 Dec 2007, 16:15
#24
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: "There was a security error when trying to login" - v1.3.8

My problem turned out to be simple - new computer, new install of ftp client with a setting that I finally discovered did not overwrite many of the files on the server.

Nedward - did you upgrade the database after importing your original sql?

If not, just run the install again to upgrade.

02 Dec 2007, 16:42
#25
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: "There was a security error when trying to login" - v1.3.8

delia:

My problem turned out to be simple - new computer, new install of ftp client with a setting that I finally discovered did not overwrite many of the files on the server.Could you tell us more about that FTP Client setting. I've had a whole spate of Stock by Attribute users reporting problems that come down to the same issue of files not being over-written by uploads during installation - but I've never actually had this problem myself.

02 Dec 2007, 16:51
#26
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: "There was a security error when trying to login" - v1.3.8

I use ws_ftp (ipswitch) pro. Under options / transfers there's a check box for
Don't transfer older/same files when transferring folders. Turns out it was default checked! It's been so long since I installed it that I forgot about that option. Since files transferred to the server show the transfer date that royally made a mess.

However, I just found out that my cart is showing the index page title wrong! Soon as I figure that out I'll let y'all know.

02 Dec 2007, 16:56
#27
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: "There was a security error when trying to login" - v1.3.8

delia:

However, I just found out that my cart is showing the index page title wrong! Soon as I figure that out I'll let y'all know.

Perhaps this issue? http://www.zen-cart.com/forum/showthread.php?t=81766

02 Dec 2007, 16:56
#28
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: "There was a security error when trying to login" - v1.3.8

delia:

I just found out that my cart is showing the index page title wrong! Soon as I figure that out I'll let y'all know.That's because there's new code to be merged into the meta_tags.php language file ... which is a discussion for another thread.

02 Dec 2007, 17:02
#29
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: "There was a security error when trying to login" - v1.3.8

Ah, missed that earlier. Of course! Meta tags changes. Got to imprint that one on my brain.

02 Dec 2007, 17:15
#30
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: "There was a security error when trying to login" - v1.3.8

delia:

Ah, missed that earlier. Of course! Meta tags changes. Got to imprint that one on my brain.

More importantly ... imprint the fact that all upgrades require merging all files ... not just core files.
Any override files need to be assessed ... ie: merge new features/entries into your customized files.

Nevertheless, I digress from the topic at hand.

02 Dec 2007, 17:17
#31
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

Re: "There was a security error when trying to login" - v1.3.8

You are so right - and now I'm going to go back and reread the list of changes.

02 Dec 2007, 18:07
#32
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

I have the same error. I am in progress of comparing and merging old/new version but have a question relative to the database upgrade not the zip files.

Is there an upgrate script or do we have to build one ourselves ?

Comparing the old database to the new I have made the following changes:

Change the Table: authorizenet authorization_type field to varchar 50

Create tables: Table: nochex_apc_transactions and Table: nochex_sessions
with this script

CREATE TABLE rws_zen_nochex_sessions (
unique_id int(11) NOT NULL auto_increment,
session_id text collate latin1_general_ci NOT NULL,
saved_session mediumblob NOT NULL,
expiry int(17) NOT NULL default '0',
PRIMARY KEY (unique_id),
KEY idx_session_id_zen (session_id(36))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

CREATE TABLE rws_zen_nochex_apc_transactions (
nochex_apc_id int(11) unsigned NOT NULL auto_increment,
order_id int(11) unsigned NOT NULL default '0',
nc_transaction_id varchar(30) collate latin1_general_ci NOT NULL,
nc_transaction_date varchar(100) collate latin1_general_ci NOT NULL,
nc_to_email varchar(255) collate latin1_general_ci NOT NULL,
nc_from_email varchar(255) collate latin1_general_ci NOT NULL,
nc_order_id varchar(255) collate latin1_general_ci NOT NULL,
nc_custom varchar(255) collate latin1_general_ci NOT NULL,
nc_amount decimal(9,2) NOT NULL,
nc_security_key varchar(255) collate latin1_general_ci NOT NULL,
nc_status varchar(15) collate latin1_general_ci NOT NULL,
nochex_response varchar(255) collate latin1_general_ci NOT NULL,
last_modified datetime NOT NULL default '0001-01-01 00:00:00',
date_added datetime NOT NULL default '0001-01-01 00:00:00',
memo text collate latin1_general_ci,
PRIMARY KEY (nochex_apc_id),
KEY idx_order_id_zen (order_id)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

Exported my old database to an sql file and changed all swedish_general_ci to
latin1 COLLATE latin1_general_ci;

CREATE DATABASE mydabasename DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;

but now when I try to login I get the security error. I will now look at the login files like you mentioned to look for the security token code.

Maybe I overwrote it by accident.

Have I missed anything database side ?

02 Dec 2007, 18:14
#33
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: "There was a security error when trying to login" - v1.3.8

FromTheRiviera:

I have the same error. I am in progress of comparing and merging old/new version but have a question relative to the database upgrade not the zip files.

Is there an upgrate script or do we have to build one ourselves ?The database upgrade is the easiest bit of all. You simply navigate to www.YOUR_SITE.com/zc_install and make sure that you select the database upgrade option.

02 Dec 2007, 18:17
#34
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

Thanks I'll try to start again . Didn't know this option existed. Must have gone too fast.

02 Dec 2007, 18:30
#35
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

I just made a fresh install on a copy of my old database but must have missed this option ?

I have got to the part :

Upgrade Detection
Check for Zen Cart™ updates when logging into Admin

This will attempt to talk to the live Zen Cart™ versioning server to determine if an upgrade is available or not. If an update is available, a message will appear in admin. It will NOT automatically APPLY any upgrades.
You can override this later in Admin->Config->My Store->Check if version update is available.
Is this what you are referring to ? If so , I do not think this will upgrade the structure of my database without overwriting the old data.

02 Dec 2007, 19:06
#36
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

It is ALWAYS recommended that you do an upgrade on a testing site, where you can afford to BREAK anything and can just restore it back easily.

With that said, if you are already doing it on a test site, just go ahead and try the options, if things don't go your way, simply copy the backup files and database back.

02 Dec 2007, 19:36
#37
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

I finally figured out that there is an sql script in the folder called ZC_INSTALL

mysql_upgrade_zencart_137_to_138

I was looking for this option in the installatoion proceedure.

Would it not be a good idea to put it there ? For newcomers like me who are first time upgraders.

Thanks for all your help.

02 Dec 2007, 19:39
#38
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,590
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

When upgrading you need to upload the zc_install directory from the new version to your site and run the upgrade procedure ...

02 Dec 2007, 20:17
#39
fromtheriviera avatar

fromtheriviera

New Zenner

Join Date:
Aug 2007
Location:
South of France
Posts:
45
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

Just ran

mysql_upgrade_zencart_137_to_138

and get error

Table 'mydbname.linkpoint_api' doesn't exist

What version did this table get created in cause I don't see it in 1.3.8 either.

Should it not read CREATE TABLE rather than ALTER TABLE ?

02 Dec 2007, 20:33
#40
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,590
Plugin Contributions:
0

Re: "There was a security error when trying to login" - v1.3.8

That is a warning not an error and can be safely ignored.