mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-28 08:11:45 +00:00
Fix passwords with {} in them
The input handler erroneously tried to make an expression out of values that did not support expressions.
This commit is contained in:
parent
f964fd8ce1
commit
5232b7c9c4
@ -112,6 +112,13 @@ _attraliases = {
|
||||
}
|
||||
_validroles = ('Administrator', 'Operator', 'Monitor')
|
||||
|
||||
|
||||
def attrib_supports_expression(attrib):
|
||||
attrib = _attraliases.get(attrib, attrib)
|
||||
if attrib.startswith('secret.') or attrib.startswith('crypted.'):
|
||||
return False
|
||||
|
||||
|
||||
def _mkpath(pathname):
|
||||
try:
|
||||
os.makedirs(pathname)
|
||||
|
@ -674,6 +674,8 @@ class InputAttributes(ConfluentMessage):
|
||||
if nodes is None:
|
||||
self.attribs = inputdata
|
||||
for attrib in self.attribs:
|
||||
if not cfm.attrib_supports_expression(attrib):
|
||||
continue
|
||||
if type(self.attribs[attrib]) in (bytes, unicode):
|
||||
try:
|
||||
# ok, try to use format against the string
|
||||
|
Loading…
x
Reference in New Issue
Block a user