English 中文(简体)
如何防止跨网站的藏匿?
原标题:How to prevent cross-site websocket hijacking?

我正在撰写一份SaaS网络应用书,通过网页表向客户提供数据。 我通过用户对连接的信号进行了认证。 我需要防止从不同网站和曲线要求上连接网页。

现场来源政策和交叉来源资源共享对网站目录没有效力,因此,在将网上链接升级到网上备案时,核实原主将防止从另一个网站进入,因为原主由浏览器验证。

The issue here is that only browser originated requests mandate authentic origin. Origins can be spoofed via curl requests outside of a browser. How then could I prevent a user connecting to the websocket using their authentication token and spoofing the origin?

问题回答

核查原主将防止从另一个网站进入,因为原主由浏览器核实。

这是你在标题中提出的问题的答案——核查服务器一侧的吉大港定居地主会防止劫持,因为浏览器会寄出正确的来源。

不清楚为什么你担心用户能够在浏览器之外连接。 如同欧洲证券交易所一样,交叉点网状的劫持实际上是对用户浏览器的攻击,也是在某些情形下自动发送证书的天赋,而不是对服务器本身的攻击。 因此,出于安全目的的原主的概念在浏览器范围以外并不真正相关。

有了网站,你不会真正控制客户的任何东西。 即便用户确实在原样的浏览器的网站上,他们也可以操作 Java本,以发送任意的网上电话。 如果你仍然担心用户这样做的能力,那么,在服务器方面花费一定时间审计逻辑和验证,以确保无论用户向它投了什么,申请都是正确的。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签