14 Commits

Author SHA1 Message Date
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Michael Tremer
ed86307602 routing.cgi: Use new perl system functions
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-10 14:46:29 +01:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Michael Tremer
88e64c23c1 routing: Fix potential authenticated XSS in input processing
An authenticated Stored XSS (Cross-site Scripting) exists in the
(https://192.168.0.241:444/cgi-bin/routing.cgi) Routing Table Entries
via the "Remark" text box  or "remark" parameter. This is due to a
lack of user input validation in "Remark" text box  or "remark"
parameter. It allows an authenticated WebGUI user with privileges
for the affected page to execute Stored Cross-site Scripting in
the Routing Table Entries (/cgi-bin/routing.cgi), which helps
attacker to redirect the victim to a attacker's phishing page.

The Stored XSS get prompted on the victims page whenever victim
tries to access the Routing Table Entries configuraiton page.

An attacker get access to the victim's session by performing
the CSRF and gather the cookie and session id's or possibly can
change the victims configuration using this Stored XSS.

This attack can possibly spoof the victim's informations.

Fixes: #12072
Reported-by: Dharmesh Baskaran <dharmesh201093@gmail.com>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-10 09:04:54 +01:00
Alexander Marx
51141b150d BUG11466: fix routing.cgi the function call in routing.cgi was fixed to call the new "exact" function.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-07 16:20:29 +00:00
Alexander Marx
1e656e8adc BUG10993: fix errormessage when editing static routes
When editing existing static routes and clicking on apply button, there
was an errormessage saying that this route is already in use.
Now the errormessage is only displayed if a new route has the same ip
than an existing one.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-12-10 16:37:22 +00:00
Michael Tremer
1574f25557 routing.cgi: Fix syntax error that caused an Internal Server Error
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-11-25 12:47:29 +00:00
Alexander Marx
6be114f03a BUG10941: fix single ip-addresses when no subnet given
Some functions when adding a new route where senseless.
Now the ip address is checked and in case of a missing / wrong
subnetmask an errormessage is raised. The ip address is preserved.
ELSE
we convert the subnetmask to cidr notation and calculate the network ip
correctly.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-10-18 19:19:51 +01:00
Alexander Marx
29f238b239 BUG 10538: Routes may only added once and should not be part of an internal network 2014-06-16 09:45:59 +02:00
Alexander Marx
b84989af49 Layout changes routing.cgi 2014-01-09 14:53:45 +01:00
Alexander Marx
623758aa65 fifteen-theme: made routing.cgi table themeable 2014-01-07 11:04:26 +01:00
Michael Tremer
860ad8cb15 routing.cgi: Fix error in regex that validates "0.0.0.0".
Fixes #10417.
2013-09-27 16:51:17 +02:00
Michael Tremer
ff1ed674e0 routing.cgi: Allow adding static routes with subnet masks.
It was not possible to enter networks in the subnet mask notation,
which is fixed by this patch.

Fixes #10219.
2012-12-11 12:16:54 +01:00
Christian Schmidt
a5b0d8bf9e Added new routing cgi. 2011-07-06 19:29:36 +02:00