mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-15 19:01:55 -06:00
Fix attribute parsing so that you can add a DN or an attribute with a '=' character in it. Fixes #454630
This commit is contained in:
parent
66aa3581fc
commit
b95c05f5c6
@ -118,7 +118,7 @@ def main():
|
|||||||
|
|
||||||
if options.setattr:
|
if options.setattr:
|
||||||
for s in options.setattr:
|
for s in options.setattr:
|
||||||
s = s.split('=')
|
s = s.split('=', 1)
|
||||||
if len(s) != 2:
|
if len(s) != 2:
|
||||||
set_add_usage("set")
|
set_add_usage("set")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -127,7 +127,7 @@ def main():
|
|||||||
|
|
||||||
if options.addattr:
|
if options.addattr:
|
||||||
for a in options.addattr:
|
for a in options.addattr:
|
||||||
a = a.split('=')
|
a = a.split('=', 1)
|
||||||
if len(a) != 2:
|
if len(a) != 2:
|
||||||
set_add_usage("add")
|
set_add_usage("add")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -234,7 +234,7 @@ def main():
|
|||||||
|
|
||||||
if options.setattr:
|
if options.setattr:
|
||||||
for s in options.setattr:
|
for s in options.setattr:
|
||||||
s = s.split('=')
|
s = s.split('=', 1)
|
||||||
if len(s) != 2:
|
if len(s) != 2:
|
||||||
set_add_usage("set")
|
set_add_usage("set")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -243,7 +243,7 @@ def main():
|
|||||||
|
|
||||||
if options.addattr:
|
if options.addattr:
|
||||||
for a in options.addattr:
|
for a in options.addattr:
|
||||||
a = a.split('=')
|
a = a.split('=', 1)
|
||||||
if len(a) != 2:
|
if len(a) != 2:
|
||||||
set_add_usage("add")
|
set_add_usage("add")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -180,7 +180,7 @@ def main():
|
|||||||
|
|
||||||
if options.setattr:
|
if options.setattr:
|
||||||
for s in options.setattr:
|
for s in options.setattr:
|
||||||
s = s.split('=')
|
s = s.split('=', 1)
|
||||||
if len(s) != 2:
|
if len(s) != 2:
|
||||||
set_add_usage("set")
|
set_add_usage("set")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -189,7 +189,7 @@ def main():
|
|||||||
|
|
||||||
if options.addattr:
|
if options.addattr:
|
||||||
for a in options.addattr:
|
for a in options.addattr:
|
||||||
a = a.split('=')
|
a = a.split('=', 1)
|
||||||
if len(a) != 2:
|
if len(a) != 2:
|
||||||
set_add_usage("add")
|
set_add_usage("add")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -236,7 +236,7 @@ def main():
|
|||||||
|
|
||||||
if options.setattr:
|
if options.setattr:
|
||||||
for s in options.setattr:
|
for s in options.setattr:
|
||||||
s = s.split('=')
|
s = s.split('=', 1)
|
||||||
if len(s) != 2:
|
if len(s) != 2:
|
||||||
set_add_usage("set")
|
set_add_usage("set")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -245,7 +245,7 @@ def main():
|
|||||||
|
|
||||||
if options.addattr:
|
if options.addattr:
|
||||||
for a in options.addattr:
|
for a in options.addattr:
|
||||||
a = a.split('=')
|
a = a.split('=', 1)
|
||||||
if len(a) != 2:
|
if len(a) != 2:
|
||||||
set_add_usage("add")
|
set_add_usage("add")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user