Sensei
- Join Date:
- Jan 2004
- Posts:
- 63,513
- Plugin Contributions:
- 177
"There was a security error when trying to login" - v1.3.8
FAQ on the "security error when trying to login" issue:
https://www.zen-cart.com/tutorials/index.php?article=312
Views: 96,060
Sensei
FAQ on the "security error when trying to login" issue:
https://www.zen-cart.com/tutorials/index.php?article=312
Sensei
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.
Zen Follower
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.
Totally Zenned
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.
Totally Zenned
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.
Totally Zenned
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.
Sensei
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
Totally Zenned
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.
Totally Zenned
Ah, missed that earlier. Of course! Meta tags changes. Got to imprint that one on my brain.
Sensei
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.
Totally Zenned
You are so right - and now I'm going to go back and reread the list of changes.
New Zenner
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 ?
Totally Zenned
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.
New Zenner
Thanks I'll try to start again . Didn't know this option existed. Must have gone too fast.
New Zenner
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 AdminThis 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.
Totally Zenned
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.
New Zenner
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.
Obaa-san
When upgrading you need to upload the zc_install directory from the new version to your site and run the upgrade procedure ...
New Zenner
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 ?
Obaa-san
That is a warning not an error and can be safely ignored.
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.