Zen Cart Logo
Forums / All Other Contributions/Addons / Is a Permanent Login (Auto-Login) Possible?

Is a Permanent Login (Auto-Login) Possible?

Views: 54,343

Results 141 to 160 of 219
23 Oct 2017, 7:55 PM
#141
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Is a Permanent Login (Auto-Login) Possible?

lat9:

I've checked the basic handling, using Zen Cart 1.5.5e and the responsive_classic template, for Chrome and did not find any issue.

What I did was:

  1. Login, ticking the "Remember me?" box.
  1. Added a product to my cart.
  1. Went to checkout (sitting on the checkout_shipping page)
  1. Went away for a while, allowing the session to expire.
  1. Came back, clicked the "Continue" button and proceeded to Checkout/Payment.

If you'll provide a specific set of actions that you've taken to reproduce the issue, I can make more progress.

1.Remember I gave you an account test on my live store? Can you do the same steps on my live store ?
2. I have Zen Cart 1.5.5, Database Patch Level: 1.5.5 ( not e ) Can you give me the changes 2 overwrite template files for version 1.5.5 please ?
3. I.ve seen some warning in my log directory:

[23-Oct-2017 08:27:57 Europe/Bucharest] PHP Warning: gzuncompress(): data error in /mystore/includes/classes/observers/class.remember_me_observer.php on line 197
[23-Oct-2017 08:27:57 Europe/Bucharest] Request URI: /mystore/bucatarie-casa/aspiratoare, IP address: 82.208.160.180
#1 gzuncompress() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:197]
#2 remember_me_observer->decodeCookie() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:210]
#3 remember_me_observer->refreshCookie() called at [/mystore/includes/classes/observers/class.remember_me_observer.php:48]
#4 remember_me_observer->__construct() called at [/mystore/includes/autoload_func.php:79]
#5 require(/mystore/includes/autoload_func.php) called at [/mystore/includes/application_top.php:170]
#6 require(/mystore/includes/application_top.php) called at [/mystore/index.php:26]

thank you

28 Oct 2017, 5:13 PM
#142
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

Phew! You were quite correct @solo_400 ... the plugin did not work!

I've submitted v1.4.3 to the Zen Cart Plugins for review; it can be downloaded here (https://www.zen-cart.com/downloads.php?do=file&id=332) once reviewed.

       This release *drops support for Zen Cart versions prior to 1.5.5* and contains the changes associated with the following GitHub issues:

#4: Cart emptied on session timeout.
#5: Specify domain and path for cookie (interoperation with URL modifiers).
#6: Apply PSR-2 styling to plugin-specific files.
#7: Capture session values for restoration.
#8: Use Zen Cart 1.5.5e as the change-basis for template-override changes.

You can download this version from the plugin's GitHub repository (https://github.com/lat9/remember_me/releases/tag/v1.4.3) if you want a "preview". I'll update this thread when the plugin is available from Zen Cart.
v1.4.3 is now available for download from the Zen Cart plugins. Note that this version still contains that debug-code identified above; I'll post back again when v1.4.4 is available.

7 Dec 2017, 6:17 PM
#143
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5 , Remember Me v1.4.4

I'm getting the following errors:

07-Dec-2017 11:02:49 America/Denver] PHP Warning: gzuncompress(): data error in /home2/sub/public_html/mywebsite/includes/classes/observers/class.remember_me_observer.php on line 199
[07-Dec-2017 11:02:49 America/Denver] Request URI: /my/Manuals/Jenn-Air_French_Fryer_Cooker_Use_and_Care_Manual?language=en, IP address: 78.46.128.204
#1 gzuncompress() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:212]
#3 remember_me_observer->refreshCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:50]
#4 remember_me_observer->__construct() called at [/home2/sub/public_html/my/includes/autoload_func.php:79]
#5 require(/home2/sub/public_html/my/includes/autoload_func.php) called at [/home2/sub/public_html/my/includes/application_top.php:170]
#6 require(/home2/sub/public_html/my/includes/application_top.php) called at [/home2/sub/public_html/my/index.php:26]

Any help would be appreciated

7 Dec 2017, 7:27 PM
#144
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

Any idea how many products are in that remembered customer's cart?

7 Dec 2017, 7:39 PM
#145
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

That was a digital file for download. it was downloaded last week by the customer.

9 Dec 2017, 5:46 PM
#146
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

May I have a link to the site (via PM if you want)?

13 Dec 2017, 8:22 PM
#147
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

I'm back here and I want to send a big Thank You to contributor of the module. Some little issues I still have to better understand, even so, a great work.

23 Dec 2017, 1:33 PM
#148
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

ZC-1.5.5e, PHP 5.6.32, Database patch level 1.5.5 , Remember Me v1.4.4

The cookie is created inside the folder of all cookies related to mysite in chrome. The cookie does what it is supposed to do until it is removed. I'm getting errors once a day as the following:

[23-Dec-2017 04:36:31 America/Denver] Request URI:** /mysite/Advertising/Buttons?zenid=0npc7ae12cu1orqumv1srgfsj1,** IP address: 64.39.140.197
#1 gzuncompress() called at [/home2/sub/public_html/mysite/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/mysite/includes/classes/observers/class.remember_me_observer.php:38]
#3 remember_me_observer->__construct() called at [/home2/sub/public_html/mysite/includes/autoload_func.php:79]
#4 require(/home2/sub/public_html/mysite/includes/autoload_func.php) called at [/home2/sub/public_html/mysite/includes/application_top.php:170]
#5 require(/home2/sub/public_html/mysite/includes/application_top.php) called at [/home2/sub/public_html/mysite/index.php:26]

[23-Dec-2017 04:36:31 America/Denver] PHP Warning: gzuncompress(): data error in /home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php on line 199
[23-Dec-2017 04:36:31 America/Denver] Request URI: /mysite/Advertising/Buttons?zenid=0npc7ae12cu1orqumv1srgfsj1, IP address: 64.39.140.197
#1 gzuncompress() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:199]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:212]
#3 remember_me_observer->refreshCookie() called at [/home2/sub/public_html/my/includes/classes/observers/class.remember_me_observer.php:50]
#4 remember_me_observer->__construct() called at [/home2/sub/public_html/my/includes/autoload_func.php:79]
#5 require(/home2/sub/public_html/my/includes/autoload_func.php) called at [/home2/sub/public_html/my/includes/application_top.php:170]
#6 require(/home2/sub/public_html/my/includes/application_top.php) called at [/home2/sub/public_html/my/index.php:26]

It seems to attempt to decode a category cookie?

23 Dec 2017, 1:44 PM
#149
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

@mikebr and @solo_400, I'll need to update the cookie-processing to specifically detect that gzuncompress error and generate an appropriate log record so that I've got more insight into what's going on.

23 Dec 2017, 6:02 PM
#150
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

@mikebr and @solo_400, I'll need to update the cookie-processing to specifically detect that gzuncompress error and generate an appropriate log record so that I've got more insight into what's going on.

I've been getting hit with the same errors off and on.. I've traced one back to a deep crawler in my case it was a different IP, but same errors.. looking at the raw access logs of my server. megaindex(dot)com/crawler

This crawler looks to be testing hack attempts by adding things to the requested link (index.php?main_page=links_submit&lPath=2) checking out the domain and IP, which don't match, the crawler is getting used by others.. I added it to my block list of bad crawlers.

I have not had a good crawler create this error.

Under normal use, Remember me works grate. If you do add a error log code I would be interested in adding it and turning off the bot block.

23 Dec 2017, 6:20 PM
#151
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

Thanks, Dave. I've recorded the issue in Remember Me's GitHub repository and should have some additional data-gathering real-soon-now.

24 Dec 2017, 5:44 PM
#152
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.

If anyone would like to "vet" the changes, simply replace the contents of the file*** /includes/classes/observers/class.remember_me_observer.php*** with the updated file content here.

I'll get that packaged up for release next week unless anyone reports additional issues.

24 Dec 2017, 6:35 PM
#153
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.

If anyone would like to "vet" the changes, simply replace the contents of the file*** /includes/classes/observers/class.remember_me_observer.php*** with the updated file content here.

I'll get that packaged up for release next week unless anyone reports additional issues.

Updated observer class and unblock the bot... will let you know what shows up. Thanks

25 Dec 2017, 2:08 PM
#154
mikebr avatar

mikebr

Zen Follower

Join Date:
May 2007
Posts:
124
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

I've made some updates to the plugin's observer-class script to gather additional information when the gzuncompress issue occurs and also updated the processing when the cookie can't be decoded.

If anyone would like to "vet" the changes, simply replace the contents of the file*** /includes/classes/observers/class.remember_me_observer.php*** with the updated file content here.

I'll get that packaged up for release next week unless anyone reports additional issues.

ok, uploaded amended file, will let you know on 1st error.

25 Dec 2017, 4:43 PM
#155
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Is a Permanent Login (Auto-Login) Possible?

This is the reoccurring error I get which looks something like a cURL error...

Error log:

[24-Dec-2017 23:49:13 America/Los_Angeles] Request URI: /cbgshop/index.php?main_page=contact_us, IP address: 62.210.111.11
#1  trigger_error() called at [/***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php:213]
#2  remember_me_observer->decodeCookie() called at [/***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php:43]
#3  remember_me_observer->__construct() called at [/***/public_html/cbgshop/includes/autoload_func.php:79]
#4  require(/***/public_html/cbgshop/includes/autoload_func.php) called at [/***/public_html/cbgshop/includes/application_top.php:170]
#5  require(/***/public_html/cbgshop/includes/application_top.php) called at [/***/public_html/cbgshop/index.php:26]

[24-Dec-2017 23:49:13 America/Los_Angeles] PHP Warning:  gzuncompress error in decodeCookie, value = deleted, _SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36, _COOKIE = array (
  'zenid' => '*b6757cd96ed12416a34bc9e2',
  'zcrm_dd28493d507e0c26b870d2305ebccfb9' => 'deleted',
) in /***/public_html/cbgshop/includes/classes/observers/class.remember_me_observer.php on line 213

Matched IP on the server log:

62.210.111.11 - - [24/Dec/2017:23:49:11 -0800] "GET /cbgshop/index.php?main_page=contact_us HTTP/1.1" 302 - "http://www.cowboygeek.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
62.210.111.11 - - [24/Dec/2017:23:49:12 -0800] "\x16\x03\x01\x018\x01" 404 - "-" "-"

User Tracking from site logs:

Click Count:     1     
Country:     France
IP Address:     62.210.111.11
Host:     sender2p3.offresduweb.fr
Originating URL:     http://www.cowboygeek.com  Contact Us      /cbgshop/index.php?main_page=contact_us

The Cookie name is on my PC and store user account I have for testing. The cookie is still active. ZenID and user folder modified.

The bad bot has not come back yet..

25 Dec 2017, 5:06 PM
#156
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

Thanks, @davewest. I'll need to investigate why that cookie's value is coming back as "deleted"; that's the source of (at least) your issue.

25 Dec 2017, 5:22 PM
#157
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

Thanks, @davewest. I'll need to investigate why that cookie's value is coming back as "deleted"; that's the source of (at least) your issue.
It looks like I need to filter a cookie-value of deleted; see this stackoverflow post for details.

25 Dec 2017, 5:44 PM
#158
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

It looks like I need to filter a cookie-value of deleted; see this stackoverflow post for details.
I've got the remember-me processing file (see this link for the current update) to check for a cookie-value of *deleted *prior to additional decoding. I also thought that this would be a "good time" to ensure that the plugin's processing is disabled (i.e. no remembering) for customers currently pseudo-logged-in for a guest checkout (e.g. COWOA, COWAA).

26 Dec 2017, 6:44 AM
#159
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Is a Permanent Login (Auto-Login) Possible?

lat9:

I've got the remember-me processing file (see this link for the current update) to check for a cookie-value of *deleted *prior to additional decoding. I also thought that this would be a "good time" to ensure that the plugin's processing is disabled (i.e. no remembering) for customers currently pseudo-logged-in for a guest checkout (e.g. COWOA, COWAA).

Uploaded the new file, will see if it fires off...

I didn't add the COWOA bit.. I tested it fully with COWAA and found COWAA had good protection already in place. None account side still has a account, but theres not any way to log in to it due to a flag in the database, where the account side whether you log in or not it should not matter if Remember Me has a cookie active for they have an account. The register side behaves the same as a full account so remember me should still work there. With COWAA I have Remember Me on login, register, and no_account pages.. The password on no_account is the key, no password, no cookie is set or account is created..

I did not test with COWOA!

the logs was created when I wasn't accessing the site.

I could recreate the error by changing gzuncompress to gzdecode and didn't change things above.. I may try this again but with more code edits. Checking the manual, it has some issues with getting a none compressed string.

Theres some more hacks I want to try tomorrow, but I'm getting things ready to go out to a Xmas version of burning man this week so may have to wait until after the new year.

26 Dec 2017, 12:48 PM
#160
solo_400 avatar

solo_400

Zen Follower

Join Date:
Aug 2009
Posts:
369
Plugin Contributions:
0

Re: Is a Permanent Login (Auto-Login) Possible?

Hey guys, I'm so happy seeing work in progress here. lat9 and dave, I'd like to test latest changes. Can I put latest class.remember_me_observer.php ( Version: 1.4.5 ) on my live wensite? I wish all a Happy New Year also.