core: line feed (\n) are now forbidden in profile names
This commit is contained in:
parent
dcab42b1d7
commit
7ad14f2252
1 changed files with 4 additions and 2 deletions
|
|
@ -461,9 +461,11 @@ class Memory(object):
|
|||
@return: Deferred
|
||||
"""
|
||||
if not name:
|
||||
raise ValueError("Empty profile name")
|
||||
raise ValueError(u"Empty profile name")
|
||||
if name[0] == '@':
|
||||
raise ValueError("A profile name can't start with a '@'")
|
||||
raise ValueError(u"A profile name can't start with a '@'")
|
||||
if '\n' in name:
|
||||
raise ValueError(u"A profile name can't contain line feed ('\\n')")
|
||||
|
||||
if name in self._entities_cache:
|
||||
raise exceptions.ConflictError(u"A session for this profile exists")
|
||||
|
|
|
|||
Loading…
Reference in a new issue