laravel Can't get the session after closing the CSRF of the specified controller method?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
Since we are closingCSRF,那么这个URL的来源可能是来自于 SWF、其他途径
CSRF
URL
SWF
其他途径
If you access the current Domain的页面,这不可能会丢失Session based on browser
Domain
Session
I guess the possible scenario is the use of Flash上传文件,那么的确会出现丢失Cookie (what is the relationship between Cookie and Session)
Flash上传文件
Cookie
Normally, I will Session ID附加到这些场景的POST的字段、或上传的URL中:url?session_id=<?php echo session_id();?>
Session ID
这些场景
url?session_id=<?php echo session_id();?>
Then reset the SessionID in the controller:
session_id($_GET['seesion_id']); Session::setId($_GET['seesion_id']);
If you use a browser to access normally, there is no need to do this.
Since we are closing
CSRF
,那么这个URL
的来源可能是来自于SWF
、其他途径
If you access the current
Domain
的页面,这不可能会丢失Session
based on browserI guess the possible scenario is the use of
Flash上传文件
,那么的确会出现丢失Cookie
(what is the relationship between Cookie and Session)Normally, I will
Session ID
附加到这些场景
的POST的字段、或上传的URL中:url?session_id=<?php echo session_id();?>
Then reset the SessionID in the controller: