-
Alex
is someone able to help me to validate this Caps Hash? ``` <query xmlns="http://jabber.org/protocol/disco#info" node="http://gajim.org#KV4qaXUgvEqhWE7WEJoqvO6gTYA="> <identity type="pc" category="client" name="Gajim" /> <feature var="http://jabber.org/protocol/bytestreams" /> <feature var="http://jabber.org/protocol/si" /> <feature var="http://jabber.org/protocol/si/profile/file-transfer" /> <feature var="http://jabber.org/protocol/muc" /> <feature var="http://jabber.org/protocol/muc#user" /> <feature var="http://jabber.org/protocol/muc#admin" /> <feature var="http://jabber.org/protocol/muc#owner" /> <feature var="http://jabber.org/protocol/muc#roomconfig" /> <feature var="http://jabber.org/protocol/commands" /> <feature var="http://jabber.org/protocol/disco#info" /> <feature var="ipv6" /> <feature var="jabber:iq:gateway" /> <feature var="jabber:iq:last" /> <feature var="jabber:iq:privacy" /> <feature var="jabber:iq:private" /> <feature var="jabber:iq:register" /> <feature var="jabber:iq:version" /> <feature var="jabber:x:data" /> <feature var="jabber:x:encrypted" /> <feature var="msglog" /> <feature var="sslc2s" /> <feature var="stringprep" /> <feature var="urn:xmpp:ping" /> <feature var="urn:xmpp:time" /> <feature var="urn:xmpp:ssn" /> <feature var="http://jabber.org/protocol/mood" /> <feature var="http://jabber.org/protocol/activity" /> <feature var="http://jabber.org/protocol/nick" /> <feature var="http://jabber.org/protocol/rosterx" /> <feature var="urn:xmpp:sec-label:0" /> <feature var="urn:xmpp:hashes:2" /> <feature var="urn:xmpp:hash-function-text-names:md5" /> <feature var="urn:xmpp:hash-function-text-names:sha-1" /> <feature var="urn:xmpp:hash-function-text-names:sha-256" /> <feature var="urn:xmpp:hash-function-text-names:sha-512" /> <feature var="jabber:x:conference" /> <feature var="urn:xmpp:message-correct:0" /> <feature var="urn:xmpp:eme:0" /> <feature var="urn:xmpp:avatar:metadata+notify" /> <feature var="http://jabber.org/protocol/mood+notify" /> <feature var="http://jabber.org/protocol/activity+notify" /> <feature var="http://jabber.org/protocol/tune+notify" /> <feature var="http://jabber.org/protocol/nick+notify" /> <feature var="http://jabber.org/protocol/geoloc+notify" /> <feature var="http://jabber.org/protocol/chatstates" /> <feature var="http://jabber.org/protocol/xhtml-im" /> <feature var="urn:xmpp:receipts" /> <feature var="urn:xmpp:jingle:1" /> <feature var="urn:xmpp:jingle:apps:file-transfer:5" /> <feature var="urn:xmpp:jingle:security:xtls:0" /> <feature var="urn:xmpp:jingle:transports:s5b:1" /> <feature var="urn:xmpp:jingle:transports:ibb:1" /> <feature var="eu.siacs.conversations.axolotl.devicelist+notify" /> </query> ```
-
Zash
Woah
-
Alex
my code always tells mt its wrong, I don't see why, have not seen caps hash errors in years ;-)
-
Zash
Prosodys util for this says `KV4qaXUgvEqhWE7WEJoqvO6gTYA=`
-
jonas’
can you paste this somewhere?
-
Zash
Code block rendering that doesn't take up the entire screen would be nice. *hint* client authors :)
-
Alex
jonas’, you need a bigger screen ;-)
-
Alex
jonas’, https://gist.github.com/agnauck/75759eff6277de616151e4cc27d72cb9
-
Alex
Zash, so Prosody sais its correct? Then something is getting messed up in my codes 🤔
-
Zash
Yes
-
Zash
https://xmpp.org/extensions/xep-0115.html#ver-gen-complex
-
Alex
can you point me ot the Prosody code you used to verify? Then I can debug and try to find dthe issue
-
Zash
https://hg.prosody.im/trunk/file/tip/util/caps.lua
-
Alex
have tons of samples in my unit tests which all succeed, but it does not like that one for some reason :(
-
Alex
thanis
-
Alex
how do I execute this LUA util?
-
Zash
Lua*
-
Zash
Save this as caps.lua or something: `print((require "util.caps".calculate_hash(require "util.xml".parse(io.read("*a")))))`
-
Zash
assumes it's in a prosody checkout and you built the C stuff and have all the dependencies
-
Alex
are you able to send me the string which LUA concats before building the hash?
-
Zash
https://www.lua.org/about.html#name
-
pep.
Lua*
-
Zash
It's the second return value of calculate_hash()
-
Zash
Alex: http://paste.debian.net/1138517/
-
Zash
looooooooong line at the end
-
Alex
thank you, owe you a beer next time we meet ;-)
-
lovetox
Alex this is a very easy example
-
lovetox
so i guess the only thing that can go wrong with that is preparing the identity correctly
-
lovetox
so i would look into that
-
lovetox
first
-
Alex
this is where I looked forst and thought its related to the xml-lang which Gajim put on the iq, but this looks correct
-
lovetox
if you find the problem i also would be interested to know in which trap you fell
-
Alex
Looks like its this: ``` urn:xmpp:hash-function-text-names:md5< urn:xmpp:hash-function-text-names:sha-1< urn:xmpp:hash-function-text-names:sha-256< urn:xmpp:hash-function-text-names:sha-512< urn:xmpp:hashes:2< ``` vs ``` urn:xmpp:hashes:2< urn:xmpp:hash-function-text-names:md5< urn:xmpp:hash-function-text-names:sha-1< urn:xmpp:hash-function-text-names:sha-256< urn:xmpp:hash-function-text-names:sha-512< ``` some weird stuff going on in .NET string sorting which I am hitting for the first time
-
jonas’
the i;octet collation is relevant for sorting
-
Alex
ya, it looks like .NET by default sorts by OS culture, fixed by using `StringComparer.Ordinal`
-
Alex
this code is on prod for over 10 years and hitting it the first time 😀
-
Zash
I sure hope nobody goes and invents some non-ascii feature
-
Alex
my OS is using Germany culture settings
-
Alex
time for a walk before publishing a fix, Thank you guys for the help 👍
-
mbt
hi everyone, currently im having trouble with implementation stanzas on xmpp.js. can anyone help me about it?
-
pep.
sonny, ^ ?
-
sonny
Feel free to open an issue with your question on the repository and I'll have a look
-
mbt
okay thanks i ll move on there