Skip to content

Commit

Permalink
strip html before showing in generic_gui_message for security reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Schleizer committed Jul 3, 2014
1 parent 845a8ff commit 91a2614
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Standards-Version: 3.9.4

Package: open-link-confirmation
Architecture: all
Depends: generic-gui-message, sensible-utils, anon-icon-pack, ${misc:Depends}
Depends: generic-gui-message, sensible-utils, anon-icon-pack,
msgcollector, ${misc:Depends}
Recommends: tb-starter, tb-updater, tb-default-browser
Description: Asks for confirmation before opening links
Asks before a link is (accidentally) opened in a browser. Links are opened in
Expand Down
2 changes: 2 additions & 0 deletions usr/lib/open_link_confirmation
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ main_function() {
## Trim temp to 128 characters.
temp="${temp:0:$trim}"

temp="$(/usr/lib/msgcollector/striphtml "${1+"$@"}")"

if [ "$temp_string_length" -gt "$trim" ]; then
local extra_long_link="<p>Note: The address is too long, so only the first $trim characters are shown.</p>"
fi
Expand Down

0 comments on commit 91a2614

Please sign in to comment.