Thank you

Peter Dobbs
President | ENGINESS | P: 416.901.6151<tel:416.901.6151;118> | F: 
416.901.6150<tel:416.901.6150> | www.enginess.io

[X]

This email and any attachments are confidential and are intended only for the 
person(s) to whom it is addressed. It you are not the addressee named above, 
any use, copying, distribution or disclosure is strictly unauthorized. If you 
have received this information in error, please delete it and any attachments 
and notify me immediately.


On Jul 31, 2018, at 5:49 PM, Robert Shubert 
<[email protected]<mailto:[email protected]>> wrote:

I’ve come up with a way for older servers (Witango/TeraScript < 7.0.3) to 
return a header with httpOnly and Secure cookies.

First, make sure that you witango.ini/server.ini has a proper path for 
DEFAULTHEADER=

Next, edit the file pointed to (should be /MiscFiles/header.tml) to contain:

HTTP/1.1 <@HTTPSTATUSCODE> <@HTTPREASONPHRASE><@CRLF>Content-Type: 
text/html<@CRLF><@IF "<@HTTPATTRIBUTE server_port> = 443 && !(<@HTTPATTRIBUTE 
http_cookie> contains 'Witango_UserReference')">Set-Cookie: 
Witango_UserReference=<@USERREFERENCE>; path=/; HttpOnly; 
Secure<@CRLF></@IF><@SETCOOKIES><@CRLF>

Caveats:

This will not set a user reference cookie when the port is not 443 (non-SSL 
HTTP port 80 for example), therefore the user scope isn’t usable outside of 
HTTPS. This is done with the expectation that the first (and only) non-SSL 
request received is responded to with a redirect to HTTPS, and that this 
request doesn’t set any variables in the user scope.

This also assumes that you are not overriding the HTTP header elsewhere in your 
application. If you are already doing so for one-off requests, that’s fine, 
they will continue to work as before. But you can’t be overriding the HTTP 
header as a normal course of processing TAFs, or if you are, you need to 
implement this logic in that assignment.

@SETCOOKIES is always present and remains unchanged, therefore it’s behavior 
will remain unchanged.

Please let me know if you have any feedback on this issue as I can make 
improvements to v 7.1 and v8.0.

Robert

________________________________
To unsubscribe from this list, please send an email to 
[email protected]<mailto:[email protected]> with "unsubscribe 
terascript-talk" in the body.


----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to