Possible problem in Snort package dealing with MicroSoft IE
-
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!
Note: I also posted this message in the Development forum as well...
gm....
-
Well - here is a fix to the issue with Microsoft IE vs other browsers….
In the /usr/local/www/snort_rules.php file there is a javascript function called 'go'.
brackets to denote an array index but instead uses the () parans… and then only if there are more than one object of the same type (lousy implementation if you ask me!)...Anyway - the "fix" to allow the different browsers, including Microsoft's IE, to display the Category information properly is to detect if the browser is msie or a different one - then setup the go function assignements accordingly:
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;
}I have tested the above code using both Firefox and MSIE-7 and it works properly - if anyone else wants to test please feel free - hopefully this will end up in the snort package as a fix..
gm…