File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 180180 };
181181}
182182
183+
184+ foreach my $chr (split ' ' , ' q3._=-/' ) {
185+ test " POST /register allows registration of usernames with '$chr '" ,
186+ # Note: this test relies on somewhat implementation-specific details,
187+ # in that it assumes that the `username` presented to `/register` maps
188+ # directly onto an MXID. In reality, a server is free to accept or reject
189+ # any `usernames` it wants, provided it maps those it accepts onto
190+ # valid MXIDs.
191+ requires => [ $main::API_CLIENTS [0],
192+ qw( can_register_dummy_flow ) ],
193+
194+ do => sub {
195+ my ( $http ) = @_ ;
196+
197+ my $reqbody = {
198+ auth => {
199+ type => " m.login.dummy" ,
200+ },
201+ username => ' chrtestuser' .$chr ,
202+ password => " sUp3rs3kr1t" ,
203+ };
204+
205+ $http -> do_request_json(
206+ method => " POST" ,
207+ uri => " /r0/register" ,
208+
209+ content => $reqbody ,
210+ );
211+ };
212+ }
213+
183214push our @EXPORT , qw( localpart_fixture ) ;
184215
185216my $next_anon_uid = 1;
You can’t perform that action at this time.
0 commit comments