Webmastersite.net
Register Log In

Browser cookie issue
Browser cookie/site issue following star link vote

Comments on Browser cookie issue

RF
Member

Usergroup: Customer
Joined: Dec 23, 2009

Total Topics: 8
Total Comments: 19
RF
Posted Dec 23, 2009 - 6:03 PM:

Note: issue is only in version 5.1.16 not with 5.0.76.

Issue is with a browser cookie that is created right after voting on a link. After voting, I cannot access my link site as my browser pukes up a http 406 not acceptable until I clear the browser's cookies. Tried on different browsers(firefox,IE,opera) and different computers/networks with same error. I have isolated the line of code to the file - classes/onelink.php line676.

if (!strstr(" {$_COOKIE[$cv]} ", " {$this->id} ")) makecookie($cv, " {$_COOKIE[$cv]} {$this->id} ", time() + ($settings->expirecookie * 86400));

The generated cookie name is blank (strange?),the value is something like ++1+, and expiration is in 2050.

When I comment that line out, no cookie is generated with no issues accessing site. Or, if I change $cv to 'test' in the makecookie, I get a cookie named test with the same value in my browser and again no issues accessing site afterwards.

I find that wsnlinks version 5.0.76 (re-installed for troubleshooting/comparison) does not generate a cookie following a vote. I'm guessing a generated unnamed cookie is causing my headache when one rates a link. Comparing code between 5.0.76(works) and 5.1.16(problem) is difficult as it appears this function had a major update.

Any "serious" issues if I leave this line commented out for now until I/we can determine a solution????

Thanks in advance for any help,

Rich



wsnlink ver 5.1.16
classes/onelink.php
line 676
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 25, 2009 - 9:58 PM:

Changing
if ($this->objecttype == 'onelink') $cv = 'votes';
to
if ($this->objecttype == 'link') $cv = 'votes';
a few lines above that should fix it.

Oddly, the blank cookie names aren't causing any problems in my browsers.
RF
Member

Usergroup: Customer
Joined: Dec 23, 2009

Total Topics: 8
Total Comments: 19
RF
Posted Dec 26, 2009 - 1:14 AM:

Yes, that fixed the issue!

Again thanks -Rich
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.