简体   繁体   中英

XSS attack from url get variable

I have a site fetch data from database and create a links to next page

The links page will required page_id and it will display title on url bar

<a href=example.php?page=2&title=foo">click</a>

The URL will display:

example.php?page=2&title=foo

page_id will be number only but title can be anything.

My questions are:

  • What if user save javascript:alert() into title?
  • Will it run script from URL?
  • Is there anything else I should take care of?

you should use:

浏览器不应该也不应(至少IE11不会)执行onclick属性中的javascript。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM