mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
fix forbidden settings access
This commit is contained in:
@@ -408,7 +408,7 @@ class ConsoleMaster(flow.FlowMaster):
|
||||
sys.exit(1)
|
||||
|
||||
if options.app:
|
||||
self.start_app(options.app_domain, options.app_ip)
|
||||
self.start_app(options.app_domain, options.app_ip, self.o.app_auth, self.o.app_readonly)
|
||||
|
||||
def start_stream(self, path):
|
||||
path = os.path.expanduser(path)
|
||||
|
||||
@@ -105,7 +105,7 @@ class DumpMaster(flow.FlowMaster):
|
||||
self.add_event("Flow file corrupted. Stopped loading.")
|
||||
|
||||
if self.o.app:
|
||||
self.start_app(self.o.app_domain, self.o.app_ip)
|
||||
self.start_app(self.o.app_domain, self.o.app_ip, self.o.app_auth, self.o.app_readonly)
|
||||
|
||||
def _readflow(self, path):
|
||||
path = os.path.expanduser(path)
|
||||
|
||||
@@ -1367,9 +1367,9 @@ class FlowMaster(controller.Master):
|
||||
self.stream = None
|
||||
app.mapp.config["PMASTER"] = self
|
||||
|
||||
def start_app(self, domain, ip):
|
||||
app.mapp.config["auth_token"] = self.o.app_auth
|
||||
app.mapp.config["readonly"] = self.o.app_readonly
|
||||
def start_app(self, domain, ip, auth, readonly):
|
||||
app.mapp.config["auth_token"] = auth
|
||||
app.mapp.config["readonly"] = readonly
|
||||
self.server.apps.add(
|
||||
app.mapp,
|
||||
domain,
|
||||
|
||||
Reference in New Issue
Block a user