Google chrome 版本 84.0.4147.125在从第三方重定向回调函数时破坏应用

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


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

}

// 在第三方回调上检索会话 public function ezi_hosted_ payment() {


    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);

}


慕盖茨4494581
浏览 66回答 2
2回答

收到一只叮咚

ASP.NET Core 3.1 和 HTTP(不是 HTTPS)中的开放 ID 身份验证也存在同样的问题。可以重现:使用更新版本 84.0.4147.125(Offizieller Build)(64 位),始终重定向到登录页面。在其他浏览器(例如edge chromium版本84.0.522.58(Offizielles Build)(64位))上工作正常。找到了一个临时解决方案:chrome://flags/ 设置:默认使用 SameSite cookie 将未指定 SameSite 属性的 cookie 视为 SameSite=Lax。站点必须指定 SameSite=None 才能启用第三方使用。– Mac、Windows、Linux、Chrome 操作系统、Android设置为禁用。更好的解决方案是在 cookie 中设置 Samesite 属性并启用 https...猜猜是这个原因吧

猛跑小猪

我找到了 .net core 3.2 的一些解决方案:设置services.AddAuthentication .AddCookie(CookieAuthenticationDefaults.AuthenticationScheme, options =>                {                    options.Cookie.SameSite = SameSiteMode.None;                    options.Cookie.SecurePolicy = CookieSecurePolicy.Always;                })设置 IDPoptions.NonceCookie.SecurePolicy = CookieSecurePolicy.Always;            options.CorrelationCookie.SecurePolicy = CookieSecurePolicy.Always;
打开App,查看更多内容
随时随地看视频慕课网APP