stages/*: disable trim_whitespace on important fields
closes #1765 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
9dd37689e3
commit
d5d8641b37
|
@ -69,7 +69,7 @@ class PasswordChallenge(WithUserInfoChallenge):
|
|||
class PasswordChallengeResponse(ChallengeResponse):
|
||||
"""Password challenge response"""
|
||||
|
||||
password = CharField()
|
||||
password = CharField(trim_whitespace=False)
|
||||
|
||||
component = CharField(default="ak-stage-password")
|
||||
|
||||
|
|
|
@ -85,7 +85,8 @@ class Prompt(SerializerModel):
|
|||
kwargs = {
|
||||
"required": self.required,
|
||||
}
|
||||
|
||||
if self.type == FieldTypes.TEXT:
|
||||
kwargs["trim_whitespace"] = False
|
||||
if self.type == FieldTypes.TEXT_READ_ONLY:
|
||||
field_class = ReadOnlyField
|
||||
if self.type == FieldTypes.EMAIL:
|
||||
|
|
Reference in a new issue