Closed abma closed 6 years ago
"Matrix requires it to be all lowercase, which is strange since i'm pretty sure i'm uppercase in lobby."
not sure how to handle [ ]: either lobby accounts must be renamed or it has to be passed through....
the same for upper-case?!
I'm taking a look sorry for the delay
bad news:
UpperCase usernames: not valid [special]characters: not allowed
Maximus 14:55 Point is: synapse allowed illegal characters: upper case characters. it no longer does and it was phased out in two steps: 1) not allowed to create Matrix ID with them anymore and then 2) disabling access to those accounts
14:56 if you have a backend that has those illegal characters, you can either fix it by using another property that would have the right value always, or by doing things where you'll 95% of the time shoot yourself in the foot
how to handle?
I don't know
Ideas?
Thanks
we could use the accountid as alternative?!
this would require a small change in the xmlrpc service.
are account names containing numbers only allowed?
if not sth. like springid1234 could be used.
we could use the accountid as alternative?!
this looks good
let me investigate
I created a branch where the localpart of the matrix user id uses the accountid from uberserver (uberserver allready gives accountid)
the thing will not allow to login with our accounts, like "turboss:springrts.com", "abma:springrts.com"
this hack does the trick but requires to modify the source of synapse and break the protocol
# mxid_localpart_allowed_characters = set("_-./=" + string.ascii_lowercase + string.digits)
mxid_localpart_allowed_characters = set("_-./=[]" + string.ascii_letters + string.digits)
not applied yet
thats IMHO a very bad idea. this very likely breaks fedaration / has possible many bad side effects. Worst case it opens a security hole.
why was the idea with "id12345" abandoned?
yes bad idea I know
not abandoned just can't figure how to do it
I'm still on it
add a second function here:
https://github.com/spring/uberserver/blob/master/XmlRpcServer.py#L104
def login_by_id(self, username, password):
which does split the prefix and validates password + db_user.id instead of the username?!
and ideally when doing this try to add functions / extend the existing one to share code :)
I'm able to validate the username against uberserver and get the user_id the I'm able to register a new account with the user_id
the problem is that the matrix client still passes the username to its own login
1- check password ok 2 get user_id ok 3 create matrix account ok 4 login with that acount instead of what the user typed (their username) not ok
I'm trying to ask MAxim again
ok he toldme that mxisd could do the trick https://github.com/kamax-io/mxisd I'm on it
we can implement what he does
4 login with that acount instead of what the user typed (their username) not ok
whats wrong with logging in via user id?
IMHO the special chars at uberserver can go when an alternative exists.
whats wrong with logging in via user id
auth provider can't replace what user typed on the login box with the user_id but the mxisd could intercept it before is sent to the matrix auth system (i'm reading the docs / source)
ok
Finally figured how to use the user_id
its currently implemented so may work
only left to change the display name to the current username
Display name should be set on first login, is set to current username
I'm closing this as its finally working
Thank You
https://springrts.com/phpbb/viewtopic.php?f=1&p=586455