diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-24 17:59:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-24 17:59:41 +0000 |
commit | f6a415fe4735debe6398aae241b873e332ada0db (patch) | |
tree | fe7fbf7da7598b250dff432120cd881143792a5c /tools/scan-view/ScanView.py | |
parent | 3b38e457793903fb9060af6c2d27b5b945d1dc95 (diff) |
Add scan-view '--allow-all-hosts' option, by default access is now
restricted to 127.0.0.1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/scan-view/ScanView.py')
-rw-r--r-- | tools/scan-view/ScanView.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/scan-view/ScanView.py b/tools/scan-view/ScanView.py index 48b8cc80d0..2e06f2a8fb 100644 --- a/tools/scan-view/ScanView.py +++ b/tools/scan-view/ScanView.py @@ -492,6 +492,10 @@ File Bug</h3> return self.send_string(result) def send_head(self, fields=None): + if (self.server.options.onlyServeLocal and + self.client_address[0] != '127.0.0.1'): + return self.send_error('401', 'Unauthorized host.') + if fields is None: fields = {} self.fields = fields |