jurgen.hart at schenkerit
Mar 14, 2012, 8:55 AM
Post #1 of 1
Adding new preferences not working. fix
After updating to version 4.1.0 I had trouble adding preferences with the WEB GUI, in the sense that already existing preferences could be changed without any problem. However adding new entries did not seem to work. After looking into the Webpage source I noticed the already exiting values had the "POST" method for the HTML form set , whereas the row for new entries did not.
Looking at the code it seemed to be handeled by the file "webInterface.c" file around line number 8423 ,thus I the lineto add METHOD=POST into the form tag, this seems to fix the issue.
Hereunder the diff output:
root [at] winterfel:~/Sources# diff ntop-4.1.0/webInterface.c ntop-4.1.0_mod/webInterface.c
< safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "<FORM ACTION="CONST_EDIT_PREFS">"
> safe_snprintf(__FILE__, __LINE__, buf, sizeof(buf), "<FORM ACTION="CONST_EDIT_PREFS" METHOD=POST>"
This seems to resolve the issue, not being a good coder I'm not sure this will break other things. So it' better the coder who know the code confirm that this fixes it.