diff options
author | Alexey Shchepin <alexey@process-one.net> | 2016-05-24 18:44:07 +0300 |
---|---|---|
committer | Alexey Shchepin <alexey@process-one.net> | 2016-06-02 18:09:58 +0300 |
commit | d201f013b2e02ee33099df90e20200e718a06c0b (patch) | |
tree | d482bfe4745fb4871657534b35b348b85d0cf1e7 /test/suite.erl | |
parent | Report in SQL when scram is enabled but the stored password isn't (#1096) (diff) |
Stronger tests in the test suite, SQL updates and fixes
Diffstat (limited to '')
-rw-r--r-- | test/suite.erl | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/test/suite.erl b/test/suite.erl index d4722b81c..f0e3ac93e 100644 --- a/test/suite.erl +++ b/test/suite.erl @@ -59,16 +59,16 @@ init_config(Config) -> [{server_port, ct:get_config(c2s_port, 5222)}, {server_host, "localhost"}, {server, ?COMMON_VHOST}, - {user, <<"test_single">>}, - {master_nick, <<"master_nick">>}, - {slave_nick, <<"slave_nick">>}, - {room_subject, <<"hello, world!">>}, + {user, <<"test_single!#$%^*()`~+-;_=[]{}|\\">>}, + {master_nick, <<"master_nick!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {slave_nick, <<"slave_nick!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {room_subject, <<"hello, world!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, {certfile, CertFile}, {base_dir, BaseDir}, - {resource, <<"resource">>}, - {master_resource, <<"master_resource">>}, - {slave_resource, <<"slave_resource">>}, - {password, <<"password!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {resource, <<"resource!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {master_resource, <<"master_resource!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {slave_resource, <<"slave_resource!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>}, + {password, <<"password!@#$%^&*()'\"`~<>+-/;:_=[]{}|\\">>} {backends, get_config_backends()} |Config]. @@ -317,7 +317,12 @@ sasl_new(<<"DIGEST-MD5">>, User, Server, Password) -> MyResponse = response(User, Password, Nonce, AuthzId, Realm, CNonce, DigestURI, NC, QOP, <<"AUTHENTICATE">>), - Resp = <<"username=\"", User/binary, "\",realm=\"", + SUser = << <<(case Char of + $" -> <<"\\\"">>; + $\\ -> <<"\\\\">>; + _ -> <<Char>> + end)/binary>> || <<Char>> <= User >>, + Resp = <<"username=\"", SUser/binary, "\",realm=\"", Realm/binary, "\",nonce=\"", Nonce/binary, "\",cnonce=\"", CNonce/binary, "\",nc=", NC/binary, ",qop=", QOP/binary, ",digest-uri=\"", |