gpt4 book ai didi

webkit - 重定向到 AIR 应用程序 :/scheme from remote URI in a WebKit iframe

转载 作者:行者123 更新时间:2023-12-02 02:25:40 25 4
gpt4 key购买 nike

我正在尝试在运行 WebKit 的 AIR 应用程序中实现 OAuth2。当应用程序启动时,会呈现一个本地页面 (app:/login.html),该页面加载一个指向远程站点的 iframe。远程站点显示一个登录页面,提交后应重定向回 app:/authenticated.html#access_token=1234xyz。看起来 WebKit 在 URL 上 barfing 而不是导致 iframe 重定向。 app:/方案之外的 URI 重定向似乎有效。

从服务器的角度来看,一切看起来都很好,因为命令:

$ curl -k -v -d"email=bazquux@foo.bar.com&password=blah" "https://foo.bar.com/oauth2/authorization?client_id=dd9766fc8042e70777b8857bee70f996&edirect_uri=app%3A%2Fauthenticated.html&response_type=token"

以下交换的结果(注意 Location header 是正确的):

> POST /oauth2/authorization?client_id=dd9766fc8042e70777b8857bee70f996&redirect_uri=app%3A%2Fauthenticated.html&response_type=token HTTP/1.1
> User-Agent: curl/7.21.2 (x86_64-apple-darwin10.3.1) libcurl/7.21.2 OpenSSL/1.0.0d zlib/1.2.5 libidn/1.19
> Host: foo.bar.com
> Accept: */*
> Content-Length: 40
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 302 Found
< Server: nginx/0.8.53
< Date: Mon, 23 May 2011 22:39:54 GMT
< Content-Type: text/html; charset=utf-8
< Connection: close
< Status: 302
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.0
< Location: app:/authenticated.html#access_token=44fab26915308753fd78ddd9e68c7a9c&expires_in=899&token_type=bearer
< X-Runtime: 1492
< Content-Length: 176
< Pragma: no-cache
< Set-Cookie: _session=BAh7BzoPc2Vzc2lvbl9pZCIlNWRmMDM5NWFmNDk0YjYxZDkwNDEzNGU1MzE2YzAwOTM6C3RlbmFudGkK--4e08d61ae521cf41f9f69b2257ad7599a675f35a; path=/; HttpOnly
< Cache-Control: private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0
< Expires: Thu, 01 Jan 1970 00:00:00 +0000
<
<html><body>You are being <a href="app:/authenticated.html#access_token=44fab26915308753fd78ddd9e68c7a9c&amp;expires_in=899&amp;token_type=bearer">redirected</a>.</body></html>

关于如何让它工作有什么想法吗?

最佳答案

阅读一些内容后,这听起来很像您遇到了 Adob​​e AIR sandbox墙壁。

iframe 内容可能位于“远程”沙箱中,而可通过 app:/方案寻址的内容可能位于特权更高的“应用程序”沙箱中。

您可以尝试 the AIR security docs 提出的跨越沙箱边界的建议.

关于webkit - 重定向到 AIR 应用程序 :/scheme from remote URI in a WebKit iframe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103758/

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