Skip to content

Modifies regex check for valid matrix server to accept ip addresses.

Jose Flores requested to merge bootloop/neochat:issue/510_ipServers into master

[Caveat] I do not feel that comfortable with regex (feel free to deny request if this looks completely wrong or if there's a better way)

I saw a recent issue (issue 501) where a user trying to login using an ip address (e.g. user:192.168.1.1 vs user:matrix.org) didn't work.

That's because there is a regex validator that was stopping them. After this change I saw that neochat attempted to make a request to the ip address I tested with.

Tested this with:

  • user:matrix.org (using my matrix user name and was able to login)
  • user:192.168.1.1 (saw the network request in the logs)
  • user:192.168.1.1:3000 (saw the network request in the logs)

I mostly relied on this site to validate but also ran the app and tested those ^^ : https://regex101.com/r/cNIKKi/1

Merge request reports

Loading