# HG changeset patch # User Goffi # Date 1472407749 -7200 # Node ID d44efd32bc2f9ba55829768acad1e9d5781f7986 # Parent 1dc3c7680ea02159917ae4bf2da96c8daede3c1d core: line feed (\n) are now forbidden in profile names diff -r 1dc3c7680ea0 -r d44efd32bc2f src/memory/memory.py --- a/src/memory/memory.py Sun Aug 28 19:42:48 2016 +0200 +++ b/src/memory/memory.py Sun Aug 28 20:09:09 2016 +0200 @@ -461,9 +461,11 @@ @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")