2
0
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:
Jarrod Johnson 2020-04-22 08:58:38 -04:00
parent f964fd8ce1
commit 5232b7c9c4
2 changed files with 9 additions and 0 deletions

View File

@ -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)

View File

@ -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