New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/cookie same site #420
base: master
Are you sure you want to change the base?
Conversation
@piotrbaczek Thank you i will look into this pr, i will probably open a new one and merge this devel since it is a new feature. |
I'd like to know if this can be merged and if not then why. |
@piotrbaczek Unfortunately not. As far as i can tell it is a new feature and adds fuctionality, this is the reason why it needs to be merged into devel (next feature release) not into master (current feature release). Usually only bug and hotfixes in master (or documentation fixes and that) small features (probably like this one) may also be merged in master but i need time to check it. |
I'm not that big fan for two extra files because few constants and I don't understand why its need constants for "secure", "expires", .... and I don't think you have to explain every constant in such detail. The following URL as source would be sufficient: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie P.S. |
PR Details
This PR implements Cookie property "SameSite".
Description
Added 2 classes: Kohana_Cookie_Properties with dictionary related to general cookie properties and Kohana_Cookie_Samesite with settings related to SameSite property.
Class Kohana_Cookie method setcookie got extended with new property $samesite. This method now uses alternative call to PHP native setcookie function, with data passed as an associative array.
Related Issue
None
Please link to the issue here
#418
How Has This Been Tested
This feature has been tested by automatic unit test - adding required cookie parameter to already existing unittest.
Secondary method of testing was done manually by adding following line in Controller_Welcome
Cookie::set('aaa','bbb');
and manually verifying existence of Cookie in Chrome Developer's Console's Application\Cookies tab.
Types of changes
Checklist