我会得到自己另一台机器(或VMware映像),删除所有Cookie,允许所有站点的所有cookie,然后进入您的网站并登录(这听起来类似于您已经尝试过)。
然后,你的银行会话结束(或期间,如果他们创造一个短命的cookie只是为了测试你有他们启用)后,看看你的饼干罐,看看有什么补充的银行。这应该告诉你你需要添加到真实机器的域名。
如果还是不行,请联系银行并解释你的问题。他们会告诉你哪些你需要允许,或者他们会告诉你让他们全部。如果是后者,你需要决定他们是否仍然值得作为你的银行。
或者,您可以:
- 使用该虚拟机设置了用于访问银行,如果你不希望出现在你的主箱的所有Cookie的沙箱。
- 设置一个脚本,删除所有非白名单饼干FF关闭后。
- 停止担心饼干完全,只是让他们(我不认为我曾经听说过的饼干被用作攻击向量)。
如果你愿意,给我发送你的帐户信息(用户名/密码),我会看看我是否可以从这里调试它:-)只是开玩笑(万一它不是很明显)。
更新:
您的银行检查的要求特别恶毒的方式。他们检查你是否接受所有的cookies,他们根本没有业务。他们应该看看他们是否可以创建一个cookie并将其读回来,这将使他们与cookie管理员兼容。
他们的代码是:
function testCookie() {
if (typeof navigator.cookieEnabled !== "undefined") {
return !!navigator.cookieEnabled;
} else{
document.cookie="testcookie";
return document.cookie.indexOf("testcookie")!=-1;
}
}
if(!testCookie()){
var browserWarningString = '';
browserWarningString += '<div class="warning">';
browserWarningString += '<p>To login to online banking, you must have
JavaScript and cookies enabled.</p>';
browserWarningString += '</div>\n';
document.getElementById("loginAuth").innerHTML = browserWarningString;
}
它的testCookie()
是第一位的return !!navigator.cookieEnabled
位这是个问题。没有任何白名单网址可以帮助你,因为只有在全球的cookieEnabled
设置为true(这不适合你,这是正确的)之后才能检查。
理想情况下,您只需将HTML代码中的testCookie()
函数替换即可。
我发现了一个类似的网站,从不同的银行谈论同样的问题(我猜银行是所有的大脑死亡的Javascript小子最终:-) here,以及两个建议的解决方案。
第一个是安装GreaseMonkey并使用此脚本here。显然,这需要为您的银行进行更改(网址,函数名称等)。
上面的第一个链接上的最后一篇文章(目前,查找“afternoonnap,2009年2月15日,上午10:10”后)也显示了如何使用NoScript实现相同的结果。这涉及用更合理的替换cookieEnabled脚本(针对该特定页面),尽管我可能只是选择用"return true"
替换它并挂起后果:-)。
希望有所帮助。
为了完整性(万一链接消失),我将在这里包含这两个脚本。该的GreaseMonkey一个归结为:
// ==UserScript==
// @name TD Canada Trust EasyWeb Repair
// @namespace tag:GossamerGremlin,2007-04-28:Repair
// @description Repair TD Canada Trust EasyWeb website.
// @include https://easyweb*.tdcanadatrust.com/*
// @exclude
// ==/UserScript==
var scriptName = "TD Canada Trust EasyWeb Repair";
// The above @include pattern is overbroad because it exposes this
// user script to potential attacks from URLs such as this:
// https://easyweb.evil.example.com/not.tdcanadatrust.com/bad.html
// The following check eliminates such possibilities:
if (location.href.match(/^https:\/\/easyweb\d\d[a-z].tdcanadatrust.com\//))
{
// Visibly mark page to remind that this script is in use.
if (document.body)
{
host = document.location.host;
dummyDiv = document.createElement('div');
dummyDiv.innerHTML = '<div><span style="color: red">Greased by: ' +
scriptName + ' (' + host + ')</span></div>';
document.body.insertBefore(dummyDiv.firstChild,
document.body.firstChild);
}
unsafeWindow.navigator.__defineGetter__("cookieEnabled",
canStoreCookieFixed);
}
// canStoreCookieFixed()
// TD's version relies on navigator.cookieEnabled, which is not set
// if customer has cookie manager, even when cookies are allowed for
// EasyWeb. The only reliable check for enabled cookies is to actually
// test if session cookie settings succeed, as done in this function
// replacement.
function canStoreCookieFixed()
{
var testSessionCookie ="testSessionCookie=Enabled";
document.cookie = testSessionCookie;
return (document.cookie.indexOf(testSessionCookie) != -1);
}
NoScript的版本归结为 “添加以下约:配置”:
[email protected]*.tdcanadatrust.com
noscript.surrogate.nce.replacement=navigator.__defineGetter__(
"cookieEnabled",function(){
var ed=new Date;
ed.setTime(0);
var tc="__noscriptTestCookie_"+Math.round((Math.random()*99999))
.toString(16)+"=1";
document.cookie=tc;
var ok=document.cookie.indexOf(tc)>-1;
document.cookie=tc+";expires="+ed.toGMTString();
return ok
}
);
测试和更新:
当我安装否脚本和FF3完全关闭cookies,然后添加以下about:config
项目,在登录提示显示为你的银行,所以我想这可能是要走的路:我建议你这样做和测试
noscript.surrogate.nce.sources = *.citizensbank.ca
noscript.surrogate.nce.replacement =
navigator.__defineGetter__("cookieEnabled",function(){return true});
它确保您仍然拥有您的所有功能。
这真的属于超级用户。 – Zifre 2009-06-03 00:21:23
我会将此归类为“逆向工程”问题,而不是“高级用户”问题。也许三部曲需要一个prequel - denialofservice.com(黑客)。这很合适,因为他们的支持拒绝提供答案,指的是发布的“要求”,其中之一是允许所有的cookies。 – ultracrepidarian 2009-06-03 00:53:42
@nameanyone,仔细看看你银行的JS代码后,白名单将不起作用。详情请参阅我的更新。 – paxdiablo 2009-06-03 04:47:29