Fix \Magento\Checkout\Controller\Index\Index::isSecureRequest method to take care of current request being secure and also from referer, as stated in phpdoc block#14428
Conversation
|
Hi @adrian-martinez-interactiv4 , regenerate_session_id call was added in order to prevent session fixation attacks. Atack possible when browsing between secure and insecure pages. We can’t remove the line in question as it may theoretically compromise security. We have the story for implementation secure cookies and session transfer mechanism. For now, I propose to leave a comment under the line with regenerate_session_id call with an explanation why it was added. |
|
Hi @sidolov , I've read https://www.owasp.org/index.php/Session_fixation article and I think I have understood what it says about session hijacking, but I have some questions about this all.
I'll be looking forward for your comments, thank you in advance. |
|
Hi @adrian-martinez-interactiv4 , thanks for your investigation! Good point for the case with fully secured pages, I agree that would be better check and skip regenerateId method call. Regarding I think moving session regeneration call to |
…to take care of current request being secure and also from referer, as stated in phpdoc block
f4435fd to
dc687c6
Compare
|
Updated PR as agreed with @sidolov after last changes. |
|
Hi @adrian-martinez-interactiv4. Thank you for your contribution. |
|
Where should we file CVE for relying on referer from client browser for issecure patch? Pretty blatant security issue , yes? |
Description
Fix \Magento\Checkout\Controller\Index\Index::isSecureRequest method to take care of current request being secure and also from referer, as stated in phpdoc block.
After last try to implement a solution for session loss in checkout, this private method did behaviour as expected. Updated as agreed with @sidolov .
Fixed Issues (if relevant)
Contribution checklist