Show More
@@ -69,7 +69,7 b' def revnavgen(pos, pagelen, limit, nodef' | |||
|
69 | 69 | class hgweb(object): |
|
70 | 70 | def __init__(self, repo, name=None): |
|
71 | 71 | if type(repo) == type(""): |
|
72 | self.repo = hg.repository(ui.ui(), repo) | |
|
72 | self.repo = hg.repository(ui.ui(report_untrusted=False), repo) | |
|
73 | 73 | else: |
|
74 | 74 | self.repo = repo |
|
75 | 75 |
@@ -110,7 +110,7 b' class hgwebdir(object):' | |||
|
110 | 110 | rows = [] |
|
111 | 111 | parity = 0 |
|
112 | 112 | for name, path in self.repos: |
|
113 | u = ui.ui() | |
|
113 | u = ui.ui(report_untrusted=False) | |
|
114 | 114 | try: |
|
115 | 115 | u.readconfig(os.path.join(path, '.hg', 'hgrc')) |
|
116 | 116 | except IOError: |
@@ -26,7 +26,8 b' def updateconfig(source, dest, sections=' | |||
|
26 | 26 | |
|
27 | 27 | class ui(object): |
|
28 | 28 | def __init__(self, verbose=False, debug=False, quiet=False, |
|
29 |
interactive=True, traceback=False, |
|
|
29 | interactive=True, traceback=False, report_untrusted=True, | |
|
30 | parentui=None): | |
|
30 | 31 | self.overlay = None |
|
31 | 32 | self.header = [] |
|
32 | 33 | self.prev_header = [] |
@@ -39,6 +40,7 b' class ui(object):' | |||
|
39 | 40 | self.debugflag = debug |
|
40 | 41 | self.interactive = interactive |
|
41 | 42 | self.traceback = traceback |
|
43 | self.report_untrusted = report_untrusted | |
|
42 | 44 | self.trusted_users = {} |
|
43 | 45 | self.trusted_groups = {} |
|
44 | 46 | # if ucdata is not None, its keys must be a superset of cdata's |
@@ -98,7 +100,7 b' class ui(object):' | |||
|
98 | 100 | user = util.username(st.st_uid) |
|
99 | 101 | group = util.groupname(st.st_gid) |
|
100 | 102 | if user not in tusers and group not in tgroups: |
|
101 | if warn: | |
|
103 | if warn and self.report_untrusted: | |
|
102 | 104 | self.warn(_('Not trusting file %s from untrusted ' |
|
103 | 105 | 'user %s, group %s\n') % (f, user, group)) |
|
104 | 106 | return False |
General Comments 0
You need to be logged in to leave comments.
Login now