Modify ↓
Opened 5 months ago
Last modified 4 months ago
#13783 assigned defect
Avoid spam link attack via quickjump feature of search
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | search system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
diff --git a/trac/search/templates/search.html b/trac/search/templates/search.html index c9ad6578b..a4aaafd3b 100644 --- a/trac/search/templates/search.html +++ b/trac/search/templates/search.html @@ -30,6 +30,7 @@ history and logs, available at https://trac.edgewall.org/. ${ super() } # if results: + <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> <meta name="startIndex" content="${results.span[0] + 1}"/> <meta name="totalResults" content="${results.num_items}"/> <meta name="itemsPerPage" content="${results.max_per_page}"/>
Attachments (0)
Note:
See TracTickets
for help on using tickets.
In addition,
search:
link should haveref="nofollow"
attribute.trac/search/web_ui.py
class_='search', href=href)trac/tests/wikisyntax.py
>search:foo</a>>search:"foo bar"</a>>Bar</a>>bar</a>>search</a>>search:foo?wiki=on</a>>search:?q=foo&wiki=on</a>>search:"foo bar?wiki=on"</a>>search:"?q=foo bar&wiki=on"</a>>Bar in Tickets</a>>Bar in Tickets</a>