Has anyone got CAB to work with cookies?

No topic. Everything you want to speak about. Please just stay courteous.

Moderators: Mug UK, Silver Surfer, Moderator Team

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Wed Oct 19, 2016 9:18 pm

It wasn't clear if this post should be in the Professional section, so I plonked it here, mods please move if the wrong call...

So, I've been working on a website under Wordpress, as in developing a theme, that would hopefully work on old machines including our beloved Atari's. Everything works great as far back as at least Netscape 3 on the Mac, and on our Atari using CAB 2.7 (sadly 1.5 won't even accept a doctype declaration before the html tag rendering it useless) the site displays almost perfectly, woohoo! Fonts really need to be set to the system font by the user in the preferences (nothing bad my site is doing, just the rendering of small text is nasty on any other setting on the Atari), a couple of minor alignment issues and it seems it's not smart enough to render white text on a black background when told, but both of these I can work around.

This was all much better than I dared hope for but then I ran into a big problem...

In order to allow the user to post to the site and do a few other things, they have to be logged in.
This means Cookies.
I discovered that even if I set CAB to accept cookies, and it seemingly does, Wordpress claims the browser doesn't support them or they are turned off.

When I view the cookies I notice the domain is set to ".com" vs the actual domain of my site (which ends in .com) and I suspect that CAB is accepting the cookie but setting the wrong domain on it. Then when the site asks for the cookie it's not matching to that incorrect domain and thus CAB isn't serving it back ergo the Wordpress error. Sounds plausible? This being the case has anyone used CAB to successfully log in to Wordpress or any other site that uses cookies?

I noticed there are 2 settings for how CAB handles cookies, if I type http://cab.ovl in the address bar I get a bunch of settings for the ovl file I'm using to connect via Sting (I forget which version but I think it was by Oliver somebody...) and it has 2 settings for accepting cookies, one of which is to let CAB handle it. That's the setting I was using. I tried changing it to "always accept" in this ovl vs "always accept" in the CAB control panel, and now I don't get the error message thrown up by Wordpress, but I'm still not logged in either, I just get returned to the login page.

Can anyone help?
:shrug:
1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Re: Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Wed Oct 19, 2016 10:47 pm

OK, closing in on the problem...

If my website is:

http://site.com

Wordpress sends a cookie with a domain value of "site.com" and CAB saves it as being under the domain value ".com"

If I set my website to be hosted at www.site.com...

Wordpress ends a cookie with a domain value of "www.site.com" and CAB saves it as being under the domain value ".site.com"

I still can't login.


Now as far as I knew a cookie with a domain beginning with a . means any sub domain, so while I can't explain why CAB is dropping the prefix off the value, I do wonder why that last one isn't accepted by Wordpress. Maybe it's just that fussy?

So I need to figure out why CAB drops the prefix and stop it doing it (not much chance of that probably) or figure out how to make Wordpress accept the period prefixed domain one without breaking it for other browsers or opening up a security issue of some kind...
1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Re: Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Thu Oct 20, 2016 3:59 am

Just because it works so well, here's a side by side of the "work in progress" site in Netscape Navigator 3 on the Mac, and CAB 2.8 on the TT.
Sorry about the ghetto video capture card of phone pointed at CRT screen in the case of the Atari, it really doesn't do it justice...
You do not have the required permissions to view the files attached to this post.
1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Re: Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Wed Mar 15, 2017 2:11 am

I'm going to bump this thread up...

Does anyone know of a site that uses cookies that CAB can actually log into?
Failing that does anyone know of a site that CAB can login to successfully? Whether you know if it uses cookies or not...

I ask as I had to give up on WordPress despite being 80% complete along an Atari compatible site template. I want people to be able to login and I believe I've confirmed that CAB simply doesn't handle sessions correctly due to the cookie domain problem I mentioned above.

So... I'm in the middle of writing my own content management system and as long as I turn cookies off on the server and fallback to PHP URL passed session IDs, login works, Yay!!!
But I'd rather not turn off cookie support completely...
The only other option is people being told they need to turn cookies off in CAB to get the fallback session handling working for them while everybody else gets the better cookie method...
1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!

User avatar
christos
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2274
Joined: Tue Apr 13, 2004 8:24 pm
Location: Greece
Contact:

Re: Has anyone got CAB to work with cookies?

Postby christos » Wed Mar 15, 2017 6:52 am

Cookies have become more complicated over the years. It might be that CAB no longer supports them. How come you aren't targetting Highwire as your browser? Do you need ssl for the site?
Felix qui potuit rerum cognoscere causas.
My Atari blog

STOT Email address: stot(NoSPAM)atari(DOT)org

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Re: Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Wed Mar 15, 2017 12:06 pm

As I understand it Highwire requires a multi tasking OS. Not everyone runs one. I read somewhere that with some judicious file deleting you can run CAB off a machine that only has a 720k floppy drive. Not that that's my target but the idea is to have as low a requirements as possible. If someone has something better than those requirements, maybe Highwire and a multi tasking OS, then of course the site still works. I want to have it work on as old and basic hardware as practical.
I should be using SSL for logins, it might not be practical though due to the age of the machines/software in question. I'll make it the default but not a requirement.
1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!

User avatar
EmpireAndrew
Captain Atari
Captain Atari
Posts: 359
Joined: Fri Jul 15, 2016 5:46 pm
Location: NYC, USA

Re: Has anyone got CAB to work with cookies?

Postby EmpireAndrew » Thu Mar 16, 2017 1:47 am

Browsing a 120KB web page, of which 110KB is a large 600x800 pixel 24 bit color image, performance isn't too bad at just under 28 seconds to download and render. That's faster than a 33.6K modem at least!



https://www.youtube.com/watch?v=TYeTDDqVeKU

It breaks down as roughly:

5 seconds to download, parse and render 5KB of table HTML
7 seconds to download the 108KB image.
14 seconds to decompress and convert the 108KB image.
1 second to download, decompress and convert 3 tiny < 2KB images.

1977 VCS Heavy Sixxer (Boxed)
1990 Atari 1040STE, 4MB, UltraSatan, TOS 2.06, TT Touch -> Atari SC1435 Colour CRT Monitor
1991 Atari TT030, 2/64MB, Int 8GB Gigafile SCSI2CF, TOS 3.06, CaTTamaran Accelerator -> Atari TTM195 19" Mono CRT Monitor
1993 Atari Falcon030, 14MB, Int 4GB IDE2SD, TOS 4.04 -> Atari PTC1426 Color CRT Monitor
Amiga, Mac, DOS, Newton, SGI, Sun, NeXTStation and more!


Social Media

     

Return to “Chat forum [ENG]”

Who is online

Users browsing this forum: codeplug and 1 guest