Nikita Vilunov nikita
  • Joined on 2023-08-25
nikita pushed to main at lavina/lavina 2023-10-04 13:55:46 +00:00
1373767d7f xmpp: add muc proto tests
nikita pushed to async-scoped at nikita/lavina 2023-10-03 11:13:07 +00:00
b23c18a5ec Merge branch 'main' into async-scoped
887fd95194 xmpp: fix parsing of unknown elements in messages
4621470bde fix graceful shutdown
Compare 3 commits »
nikita opened issue lavina/lavina#22 2023-10-03 11:10:28 +00:00
Message archive management in XMPP (XEP-0313)
nikita opened issue lavina/lavina#21 2023-10-02 23:39:28 +00:00
Stream management in XMPP
nikita pushed to main at lavina/lavina 2023-10-02 22:17:59 +00:00
887fd95194 xmpp: fix parsing of unknown elements in messages
nikita pushed to main at lavina/lavina 2023-10-02 21:35:53 +00:00
4621470bde fix graceful shutdown
nikita pushed to async-scoped at nikita/lavina 2023-10-02 21:00:53 +00:00
2d493814b9 Merge branch 'main' into async-scoped
9fca913430 xmpp: fix parsing of unknown elements in messages (#20)
8047a97baa remove /test/
47195f5eee add crates/README.md
2f034284cf rename telemetry mod to http
Compare 20 commits »
nikita commented on pull request lavina/lavina#19 2023-10-02 20:21:06 +00:00
[xmpp] logopass auth

also some tests would be nice, especially for cases with empty segments:

  • \x00test\x00 should be AuthBody { login: "test", password: "" }
  • \x00\x00 should be `AuthBody { login: "",…
nikita pushed to main at lavina/lavina 2023-10-01 23:16:27 +00:00
9fca913430 xmpp: fix parsing of unknown elements in messages (#20)
nikita merged pull request lavina/lavina#20 2023-10-01 23:16:25 +00:00
xmpp: fix parsing of unknown elements in messages
nikita pushed to fix-xmpp-messages at nikita/lavina 2023-10-01 23:15:04 +00:00
572a0b7b6a Merge branch 'main' into fix-xmpp-messages
8047a97baa remove /test/
47195f5eee add crates/README.md
Compare 3 commits »
nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

each unwrap() crashes the thread completely which is not very desirable. instead it's better to return an Err from the method

nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

better to accept input as a slice

nikita suggested changes for lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth
nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

fine for now, but this fails the stream, and instead we should send a proper XML error to the client

nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

AuthBody.login here

nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

I don't think you need that clone here, you can just make the function argument mutable

nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

You can do

nikita commented on pull request lavina/lavina#19 2023-10-01 22:28:51 +00:00
[xmpp] logopass auth

not sure about the algorithm, afaik there could be three different segments: <authzid>\x00<authcid>\x00<passwd>, the first one could be empty and we don't really use it (for now? not sure), but it's better not to skip empty ones and just ignore them

nikita commented on pull request lavina/lavina#19 2023-10-01 22:22:32 +00:00
[xmpp] logopass auth

you can just compare them directly without taking references and without specifying the numeric type (it will be inferred automatically)

if separated_words.len() == 2