aboutsummaryrefslogtreecommitdiffstats
path: root/include/nms/web.pm
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly.no>2016-03-04 18:40:51 +0000
committerKristian Lyngstol <kly@kly.no>2016-03-04 18:40:51 +0000
commitb4527d6f786ec856f0346a600db81aaf849bb363 (patch)
treebde2151f7490f0e07068f34ac9f4427de8bcb212 /include/nms/web.pm
parent15dde408db57009e1e4e26d969b9b3e6c1e0c255 (diff)
NMS: Remove now redundant "Security" things
Better to have proper isolation than this crud.
Diffstat (limited to 'include/nms/web.pm')
-rwxr-xr-xinclude/nms/web.pm23
1 files changed, 0 insertions, 23 deletions
diff --git a/include/nms/web.pm b/include/nms/web.pm
index 2b39911..74f40c1 100755
--- a/include/nms/web.pm
+++ b/include/nms/web.pm
@@ -16,7 +16,6 @@ our @EXPORT = qw(finalize_output json dbh db_safe_quote %get_params get_input %j
our $dbh;
our $now;
our $when;
-our $ifname;
our %cc;
sub get_input {
@@ -61,23 +60,6 @@ sub setwhen {
return $when;
}
-sub ispublic() {
- if (defined($get_params{'public'}) || $ENV{'REMOTE_USER'} eq "public") {
- return 1;
- } else {
- return 0;
- }
-}
-# Sets the ifname. If we are logged in, it's simply set to "ifname", otherwise
-# it's hashed for anonymization.
-sub obfuscateifname {
- my $ifname = "ifname";
- if (defined($get_params{'public'})) {
- $ifname = "regexp_replace(ifname, 'ge-0/0/(([0-3][0-9])|(4[0-3])|([0-9]))\$',concat('ge-participant',sha1_hmac(ifname::bytea,'".$nms::config::nms_hash."'::bytea))) as ifname";
- }
- return $ifname;
-}
-
sub finalize_output {
my $query;
$query = $dbh->prepare ('select ' . $now . ' as time;');
@@ -104,11 +86,6 @@ BEGIN {
$dbh = nms::db_connect();
populate_params();
- # FIXME: Shouldn't be magic.
- # Only used for setting time in result from DB time.
- # FIXME: Clarification, this _has_ to be set before setwhen is run,
- # since it secretly overrides it.
$when = setwhen();
- $ifname = obfuscateifname();
}
1;