Nikita Vilunov nikita
  • Joined on 2023-08-25
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

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

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

better to accept input as a slice

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: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: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
nikita created pull request lavina/lavina#20 2023-10-01 19:55:05 +00:00
xmpp: fix parsing of unknown elements in messages
nikita pushed to fix-xmpp-messages at nikita/lavina 2023-10-01 19:54:31 +00:00
ea0377c78a fix message parsing
7c89936a87 xmpp: fix message parsing when unknown elements are present
2f034284cf rename telemetry mod to http
dc0a101fe6 split xmpp projection into a separate crate
854a244dbc split irc proejction into a separate crate (#18)
Compare 6 commits »