小编Joa*_*ira的帖子

导航器凭据创建方法返回异常

尝试在 Firefox Nightly 下运行可用的 webautn 规范 ( https://www.w3.org/TR/webauthn/ )演示( https://github.com/molekilla/webauthn-demo-fork )。

getMakeCredentialsChallenge({
        username,
        name
    })
    .then((response) => {
        console.log(response);

        let publicKey = preformatMakeCredReq(response);

        console.log(publicKey);

        console.log(publicKey.challenge)

        return navigator.credentials.create({publicKey})
    })
Run Code Online (Sandbox Code Playgroud)

每当执行到达 return 语句时,Promise 将保持挂起状态几秒钟,并最终拒绝,记录[Exception... "Abort" nsresult: "0x80004004 (NS_ERROR_ABORT)" location: "<unknown>" data: no]UnknownError: The operation failed for an unknown transient reason。这两个对象看起来都很好。知道它没有解决的原因吗?

credential-manager firefox-nightly webauthn

6
推荐指数
0
解决办法
757
查看次数

如何在 Chrome 94 中禁用同源策略?

出于开发目的,我有一个专门配置的 Google Chrome 快捷方式,它允许我们绕过同源策略。这将依次设置一个包含对该端点的查询结果的 cookie,无论如何,配置如下。

C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-gpu --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure --disable-web-security --user-data-dir="C:\Users\joao.pereira\Documents\cors_user_data_dir"
Run Code Online (Sandbox Code Playgroud)

然而,根据发行说明,从 Chrome 91 开始,Chrome 94 将被删除SameSiteDefaultCookiesCookiesWithoutSameSiteMustBeSecure

2021 年 3 月 18 日:从 Chrome 91 开始,标记 #same-site-by-default-cookies 和 #cookies-without-same-site-must-be-secure 已从 chrome://flags 中删除,因为其行为是现在默认启用。在 Chrome 94 中,命令行标志 --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure 将被删除。

这就是 Chrome 94 的到来。由于这些内容被删除,我目前无法访问预期的资源。不幸的是,降级 Chrome 版本也不是一个选择,因为计算机是由组织控制的。设置具有类似配置的另一个浏览器也是可行的,因此也感谢这方面的建议。

google-chrome same-origin-policy

6
推荐指数
1
解决办法
1974
查看次数

在 Prolog 中打乱列表

一个简单的问题,如何在 Prolog 中对列表进行洗牌,这A1就是洗牌后的列表?

shuffle([1,1,1,2,3,4],A1),
Run Code Online (Sandbox Code Playgroud)

我尝试了一些我在网上找到的谓词,但它们似乎都不起作用。根据 SWI-Prolog 的说法,也发现了这个,但显然它不再可用。

shuffle list prolog

2
推荐指数
1
解决办法
2176
查看次数