summaryrefslogtreecommitdiff
path: root/src/jlib.erl
diff options
context:
space:
mode:
authorMickaël Rémond <mickael.remond@process-one.net>2006-07-07 08:06:12 +0000
committerMickaël Rémond <mickael.remond@process-one.net>2006-07-07 08:06:12 +0000
commit6290bac932f20de797a9c07da10c4a8de245ef07 (patch)
tree8e81e9ff6b7fd53d3c8e39aadf28b7dec19d22be /src/jlib.erl
parent* src/mod_muc/mod_muc_room.erl: Fixed the order in which room presence (diff)
* src/web/ejabberd_web_admin.erl: User creation form now creates
the user for the current virual host only and does not require to type the hostname (EJAB-116). * src/jlib.erl: String to JID conversion now returns an error if the JID string contains two arobases. SVN Revision: 588
Diffstat (limited to '')
-rw-r--r--src/jlib.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jlib.erl b/src/jlib.erl
index 5de126ee..74369cf2 100644
--- a/src/jlib.erl
+++ b/src/jlib.erl
@@ -181,6 +181,9 @@ string_to_jid1([], "") ->
string_to_jid1([], N) ->
make_jid("", lists:reverse(N), "").
+%% Only one "@" is admitted per JID
+string_to_jid2([$@ | _J], _N, _S) ->
+ error;
string_to_jid2([$/ | _J], _N, "") ->
error;
string_to_jid2([$/ | J], N, S) ->