在 IE 中通过 iframe 提交 HTTPS 问题
我正在编写一个脚本来自动登录到 Basecamp 的一个项目...到目前为止,我已经想出了以下简单的内容,只是您提交的将帖子发布到 iframe 的表单:
<html>
<head>
<style>
#bc1{ width: 100%; height: 350px; }
</style>
</head>
<body>
<iframe id="bc1" name="_bc1"></iframe>
<form method="post" id="bcform" action="https://launchpad.37signals.com/session" target="_bc1">
<input name="authenticity_token" type="text" value="PyweDIeBkqaAOltDviI/nOADpyrESRDf77R2v7W/6tM=" />
<input id="product" name="product" type="text" value="basecamp" /><br/>
<input autocapitalize="off" autocomplete="on" class="overlayable" id="username" name="username" title="Username" type="text" />
<input autocomplete="on" class="overlayable" id="password" name="password" title="Password" type="password" />
<input name="commit" type="submit" value="Sign In" />
</form>
</body>
</html>
这适用于除 IE8 之外的所有浏览器(大概是 7 和 6)
在文本框中输入您的大本营登录名/密码,然后单击“登录”进行尝试。
有谁知道为什么这在 IE 中会崩溃,但在其他浏览器中却可以?
I'm working on a script to automatically sign you in to basecamp for a project... so far i have come up with the following as something simple just a form you submit which posts to an iframe:
<html>
<head>
<style>
#bc1{ width: 100%; height: 350px; }
</style>
</head>
<body>
<iframe id="bc1" name="_bc1"></iframe>
<form method="post" id="bcform" action="https://launchpad.37signals.com/session" target="_bc1">
<input name="authenticity_token" type="text" value="PyweDIeBkqaAOltDviI/nOADpyrESRDf77R2v7W/6tM=" />
<input id="product" name="product" type="text" value="basecamp" /><br/>
<input autocapitalize="off" autocomplete="on" class="overlayable" id="username" name="username" title="Username" type="text" />
<input autocomplete="on" class="overlayable" id="password" name="password" title="Password" type="password" />
<input name="commit" type="submit" value="Sign In" />
</form>
</body>
</html>
this works in all browsers except IE8 (and presumably 7 and 6)
type in your basecamp login/password into the text boxes and click sign in to give it a try.
does anyone know why this breaks in IE but works in other browsers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您也不通过 HTTPS 提供初始页面,则在 iframe 中使用 HTTPS 不会增加任何安全性,因为 iframe 本身的 URI 可能会被攻击者更改,而用户不会注意到它:
HTTP 和 HTTPS iframe
If you're not serving the initial page over HTTPS too, using HTTPS within an iframe doesn't add any security, since the URI of the iframe itself could be altered by an attacker and the user wouldn't notice it:
HTTP and HTTPS iframe