gpt4 book ai didi

php - Google chrome 版本 84.0.4147.125(官方构建)(64 位)在重定向来自第三方的回调函数时破坏应用程序 session

转载 作者:行者123 更新时间:2023-12-03 15:54:13 26 4
gpt4 key购买 nike

//在进入第三方网关托管表单之前创建 session

public function ezi_test() {

if (isset($_SESSION['form_data'])) {
unset($_SESSION['form_data']);
}

$this->common->maintain_log(array('collection_type'=>3,'org_id'=>'','log_path'=>'gateway_log/ezidebit/hosted_payment_formdata_creation_bef','log_data'=>json_encode($_REQUEST)));
parse_str($_REQUEST['data1'], $_REQUEST);
$_SESSION['paynow']['tnc']['email_id'] = isset($_REQUEST['email_id']) ? $_REQUEST['email_id'] : '';
$this->common->maintain_log(array('collection_type'=>3,'org_id'=>'','log_path'=>'gateway_log/ezidebit/hosted_payment_formdata_creation','log_data'=>json_encode($_REQUEST)));

$_SESSION['form_data'] = $_REQUEST
}
//在第三方回调中检索 session
公共(public)功能 ezi_hosted_pa​​yment() {
    if (isset($_SESSION['ezi_hosted'])) {
unset($_SESSION['ezi_hosted']);
}

if (isset($_SESSION['form_data'])) {
$form_data = $_SESSION['form_data'];
unset($_SESSION['form_data']);
}

$this->common->maintain_log(array('collection_type'=>3,'org_id'=>'','log_path'=>'gateway_log/ezidebit/hosted_payment_log','log_data'=>json_encode($_REQUEST)));

$this->common->maintain_log(array('collection_type'=>3,'org_id'=>'','log_path'=>'gateway_log/ezidebit/hosted_payment_formdata','log_data'=>json_encode($form_data)));

$final = array_merge($_REQUEST, $form_data);
$_SESSION['pg_response'] = $_REQUEST;
$this->ezi_gateway_paynow_sub($final);
}

最佳答案

与 ASP.NET Core 3.1 和 HTTP(不是 HTTPS)中的开放 id 身份验证相同的问题。
可以重现:使用更新版本 84.0.4147.125(Offizieller Build)(64 位),始终重定向到登录页面。在其他浏览器上(例如 edge chromium 版本 84.0.522.58 (Offizielles Build) (64-Bit))工作正常。
我读了一些关于它的文章(德语)
https://www.heise.de/news/Chrome-84-Google-verlangt-SameSite-Attribut-und-HTTPS-4844124.html
[更新]
找到了一个临时解决方案:chrome://flags/
设置:默认为 SameSite cookie
将未指定 SameSite 属性的 cookie 视为 SameSite=Lax。站点必须指定 SameSite=None 才能启用第三方使用。 – Mac、Windows、Linux、Chrome 操作系统、Android
设置为禁用。
更好的解决方案是在 cookie 中设置 samesite 属性并启用 https ...
估计是这个原因。

关于php - Google chrome 版本 84.0.4147.125(官方构建)(64 位)在重定向来自第三方的回调函数时破坏应用程序 session ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63359918/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com