linuslovetox, do you know if the URL parsing code conforms to the RFC?
linusURI*
lovetoxit says so in the post
linusbecause it is basically two separate tasks: parsing the URI, and then checking the JID
linusURL parsing code
linusURI*
linusnot JID checking
lovetoxah
lovetoxno
lovetoxi dont know
linusbecause that's just as important for this stuff not to break :p
lovetoxi would just use it, test it against some cases
lovetoxthere is probably not a 100% perfect solution out there
lovetoxif i write it myself it will probably not even be 5% perfect :D
lovetoxso i guess we start with some checking function
lovetoxand extend it if bugs are reported
lovetoxi mean right now there is no check whatsoever
lovetoxso its definitly a step forward
lovetoxeven if it catches not every case
linusTrue :D
Link Mauvelinus, xmpp://user@server would mean “connect as user@server”, which makes no sense on XMPP.
Link MauveAlso, of course Gajim already does validate JIDs, just use that existing code.
praveenstef.an: on poddery.com we accept connections over port 443. You can ask your admin to enable it.
praveenstef.an: https://wiki.debian.org/InstallingProsody#XMPP_over_HTTPS this how we did it using prosody, you can share it with your admin.
lovetoxLink Mauve
lovetoxgajim does not validate the jid when you click that link
lovetoxas you can see in your xml console
lovetoxwhere a endless loop starts requesting vcards
lovetoxto an invalid jid
lovetoxalso you cant produce a link where gajim would tell you "invalid jid"
lovetoxit always opens a chat window, like you could start writing to that adress
lovetoxand i found no methode in gajim that validates a JID
lovetoxsome methodes implement their own checks, but i found no dedicated methode that does only check a jid for validity
Link Mauvelovetox, err, just do it the Python way, create a JID from the string and if you catch the InvalidJID or whatever exception you know it was invalid and react accordingly.
Link MauveDo that at the dbus entrypoint.
lovetoxyeah so you need a methode that parses the string and throws exception
lovetoxall i can see right now is a methode that does split @ , split /
lovetoxand thats user, domain, resource
lovetoxthats just not good enough :)
linusthen we fix that :p
lovetoxthere is a parsejid function in helpers.py
linusyeah
lovetoxit uses some method from the nbxmpp api
lovetoxi think this could be good enough
linusdoesn't look like it to me
linusall the actual parsing is in helpers.py, decompose_jid
lovetoxno
lovetoxreturn prep(*decompose_jid(jidstring))
lovetoxlook at prep
lovetoxso there is "def hyperlink_handler"
lovetoxin htmltextview.py and conversationtextview.py
lovetoxthat defines what happens if we click a link
lovetoxthat has xmpp in it
lovetoxso before executing the action we should parse the jid, and catch exception
lovetoxseems easy enough
Link Mauvelovetox, common.helpers.parse_jid.
linusLink Mauve: yes, he pasted the code for that above
Link MauveAh.
Link MauveSorry, I wasn’t there yet, I went to a restaurant in the meantime and am only catching up with logs. ^^