summaryrefslogtreecommitdiff
path: root/security/msf/patches/patch-aa
blob: 6cbb6ee7cd7e7e877754d24847903b82c159bd91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-aa,v 1.1 2005/08/03 20:37:44 adrianp Exp $

--- msfweb.orig	2005-08-03 21:12:33.000000000 +0100
+++ msfweb	2005-08-03 21:04:52.000000000 +0100
@@ -616,7 +616,18 @@
     my $res = {};
     
     foreach (keys(%{$state})) {
-        if (m/^OPT\_(.*)/ && defined($state->{$_})) { $res->{$1} = $state->{$_} }
+        if (m/^OPT\_(.*)/ && defined($state->{$_})) {
+			my $name = $1;
+			
+			# Block all options starting with underscore (thanks Dino!)
+			if ($name !~ /^_/) {
+				$res->{$name} = $state->{$_};
+			}
+			else {
+				# XXX - report a possible "refang" attack?
+				next;
+			}
+		}
     }
     return $res;
 }