Project

General

Profile

Bug #1060

Firewall Aliases, no tooltip in Rules if apostrophe in detail description

Added by David Szpunar over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Category:
Web Interface
Target version:
Start date:
11/30/2010
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.0
Affected Architecture:

Description

When editing aliases under Firewall->Aliases, if I have an alias of type Host(s) and in the Description field to the right of each host IP entry (not the overall Alias description field) I have an apostrophe (') anywhere in any of the hosts' descriptions, then once I save and apply the alias and use it in a rule, when I hover over the alias when viewing the rules overview for an interface, the tooltip that normally pops up to display the Alias description and details does not pop up.

It shows a small question mark like it is trying to pop the tooltip up, but only when that apostrophe is in one of the detail descriptions it fails to display (on Google Chrome and Firefox, Windows 7 64-bit). I tested this with a couple of Host type aliases but not other types, though I assume it can be generalized to any apostrophe in any alias detail (individual entry not overall alias) description field.

Basically the apostrophe is not being escaped in the JavaScript for the tooltip, for example this would cause the problem with no tooltip popping up (from <a> tag attribute when viewing source of web interface for LAN rules, firewall_rules.php, and maybe elsewhere I don't know):

onmouseover="domTT_activate(this, event, 'content', '<h1>Facilities Laptop (Mike Smith):</h1><p>172.16.1.1 - Mike Smith's laptop wired<br>172.16.1.2 - Mike Smith laptop wireless<br></p>'

As you can see the ' in "...Mike Smith's laptop..." is not escaped and thus prematurely ends the JavaScript tooltip argument. This does not happen when apostrophes are in the overall Alias description field, those are escaped properly. I'm guessing this will be easier and faster to fix than it took me to research and report it :-)

Associated revisions

Revision b6ab9bd2 (diff)
Added by Ermal Luçi over 8 years ago

Ticket #1060. Escape even the alias entry descritpions.

History

#1 Updated by Ermal Luçi over 8 years ago

  • Status changed from New to Feedback

Committed.

#2 Updated by David Szpunar over 8 years ago

Confirmed fixed on latest snapshot, using same aliases from same config as the bug was submitted, and tooltip now shows up correctly including where there are apostrophes in the detail notes for any of the detail entries for the alias.

#3 Updated by Chris Buechler over 8 years ago

  • Status changed from Feedback to Resolved

thanks

Also available in: Atom PDF