Possible html bug (or Windows IE crap)….
-
I am not sure if this is the right place to post and hopefully someone with development rights reads this posting but I have found a small "gotcha" in the Snort package that affects MicroSoft IE-7 and most likely other variations of a lousy browser.
I would not bring it up but I suspect there will be a good number of people using pfsense and wanting to control it through the Microsoft browser (possibly because the usage policy does not allow installation of other browsers)…. besides, I would think you would want to cover all the bases...
Anyway - in the /usr/local/www/snort_rules.php file there is a javascript function called 'go()'.
The first line in the function reads: "box = document.forms[1].selectbox;"
Microsoft's javascript system interprets that to say: "box = document.forms.1.selectbox;" which, of course, does not exist on the document being displayed in the browser - this means you can not select the Category for the Rules to view or edit.
The "fix" is to remove the [1] in the line so IE-7 and cousins will interpret the line correctly - If this "breaks" other, well mannered browsers then you need to include code in the javascript function to determine "what" browser is performing the action and adjust the variable assignment accordingly ….
I know - it's a pain but you want to cover all the bases I would think! :)
gm....
-
I opened a ticket on this.
http://cvstrac.pfsense.com/tktview?tn=1483If you come across bugs in the future, can provide that good and specific of an explanation, and ideally have a fix as well though that's not required, please feel free to go ahead and open a ticket in cvstrac yourself.
thanks for the find.
-
@cmb:
I opened a ticket on this.
http://cvstrac.pfsense.com/tktview?tn=1483If you come across bugs in the future, can provide that good and specific of an explanation, and ideally have a fix as well though that's not required, please feel free to go ahead and open a ticket in cvstrac yourself.
thanks for the find.
Will do…
BTW: The method I used to fix the problem was to replace the go() function like this:
function go()
{
var agt=navigator.userAgent.toLowerCase();if (agt.indexOf("msie") != -1) {
box = document.forms.selectbox;}
else
{box = document.forms[1].selectbox;}destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}That pretty much takes into account the msie vs world issue… :)
gm...
-
Bumping this so gmckinney's code edit above can hopefully be used to close Ticket 1483. Removing the [1] breaks usage with Firefox but gmckinney's edit gives functionality to both Firefox and IE.
http://forum.pfsense.org/index.php/topic,6809.0.html
-
I realize a ticket had been taken on this issue (but closed before the actual "fix" was implemented) and that 1.2 is in a "freeze" configuration for release pending any real show stoppers but thought I would "flag" this item so it does not drop through the crack :)
The "fix" for the snort Rules display in the GUI file /usr/local/www/snort_rules.php is as follows:
function go()
{
var agt=navigator.userAgent.toLowerCase();if (agt.indexOf("msie") != -1) {
box = document.forms.selectbox;}
else
{box = document.forms[1].selectbox;}destination = box.options[box.selectedIndex].value;
if (destination) location.href = destination;
}The above takes into account the differences in IE and the rest of the world to allow the snort rules to be displayed properly in most of the web browsers in use.
Just thought I would mention it… :)
gm...