Element-web: V3 events (with slashes in them) break generated permalinks and cause you to lose your place in the timeline when forwarding events.

Created on 17 Apr 2019  路  11Comments  路  Source: vector-im/element-web

Forwarding many events from one room to another is messed up in Riot.

  1. I can't just forward few events (in my case photos), like selecting few of them and forward them at once so I have to do it one by one, I'm feeling sick when I do it for 20 events for instance;

  2. Very strange bug I tried to avoid but failed. When you forward an event from room __A__ to room __B__ you just go back to room __A__ to forward next event in the list, but when you press forward on next event scroll falls down to the last event in the room, so now you're lost the last item you were trying to forward, so after a forward it to __B__ you now have to go to room __A__ and find that last forwarded event, so hard to not get tired;

  3. As a possible way to avoid bug in pt. 2 I just imagined I could anchor on specific events. So what I was trying to do is clicking on current event I'm forwarding at the moment (clicking on time of event, on the left side) so I would have exact URI link in my browser history, forward an event and then just press "back" button in my browser, but it works only for one event, or sometimes somehow for few but always failing with error on screenshot:

Screenshot from 2019-04-17 23-14-16

Version information

  • Platform: web (in-browser)
  • Browser: Firefox Quantum 66.0.2 (64-bit)
  • OS: Fedora Workstation 28 (Twenty Eight)
  • URL: https://riot.im/app/
matrix-react-sdk version: <local>
riot-web version: 1.0.7
olm version: 3.0.0
bug p1 馃敟 Fire 馃敟

All 11 comments

I realized that events which have such issues are have slashes in their ids.
Like this one: $3/*****************/*********************** (* stands for [a-zA-Z0-9]).
Everything is okay with events which don't have slashes, like this: $*******************************************

It's probably related to parsing pathname by router.
And when I see that error on screenshot, I see only this:
https://riot.im/app/#/room/!******************:matrix.org/$3
So event id is sliced after first slash. When I just click on time of events it becomes:

https://riot.im/app/#/room/!******************:matrix.org/$3/*****************/***********************

But when I move back and forth in history it resolves to that error and link is sliced.

And if I follow by that full link in new tab, URI becomes sliced and I see this error:
Screenshot from 2019-04-18 01-13-10
If I try to join I see this:
Screenshot from 2019-04-18 01-13-26

I also reproduced that in events which have + symbol in their ids:
$***************************************+
In this case whole event id sliced from URI.

__UPD:__ But it seems only when + at the end of id, this works okay:
$*********+***********************+*********

Thanks for the investigation @unclechu - you're right, these issues do seem to be cause on events with slashes (or perhaps +es) in them. I've updated the title to reflect that these are 'v3' events (my understanding is that event ids won't always be allowed to have slashes in them, but we have to fix riot to defend against them for current events.

https://github.com/matrix-org/matrix-react-sdk/pull/2827 should have fixed the general case of this, which is currently unreleased (in 1.1.0-rc.1). The other portion of this is highly related to https://github.com/vector-im/riot-web/issues/9424 / https://github.com/vector-im/riot-web/issues/9149

I think this is fixed by https://github.com/matrix-org/matrix-react-sdk/pull/2827 - I can't reproduce it anymore.

@turt2live When this fix is supposed to be delivered to stable Riot branch? Will this issue be marked with some tag then?

It should have landed in 1.1.0

@turt2live Hmm... It seems it's already fixed in stable Riot branch (I mean https://riot.im/app/ by that).

Yes, that is 1.1.2 which includes 1.1.0

@turt2live Cool, thanks for fixing it!

Was this page helpful?
0 / 5 - 0 ratings