2

如何对子域名下的网页注入脚本

 2 years ago
source link: https://www.v2ex.com/t/817047
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  JavaScript

如何对子域名下的网页注入脚本

  SSang · 14 小时 37 分钟前 · 1228 次点击

我搞了一个登录页面,用来给一些没有鉴权的第三方的网页做鉴权网关,用 nginx 的 auth_request 做的。 实现的效果是,第三方网页接入 nginx 后,访问反向代理地址如果未登录就跳转到登录页面(有点像是 basicAuth )。

但是登录成功,重定向会第三方网页后,没有登出按钮,只能手动地址栏输入 ..../logout 来登出。

我想知道对子域下的网页理论上是否能实现注入一个登出按钮?有什么限制?

主要是不想改第三方的代码,也改不动。

(我大概了解了 XSS 注入,但感觉这个得利用网页表单提交等漏洞,而且没有通用性。)


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK