-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MXIDs with slashes (/
) incorrectly rejected
#288
Comments
this probably happens because the parser does split the fragment (except the common prefix) by Line 114 in fde5309
|
this issue made me stop using https://cactus.chat/ in my static website and will instead use https://giscus.app/ |
Maintainer of Cactus Comments here. |
We have likely the same issue: If I "copy the room link" in Element Desktop (or Web too BTW), https://matrix.to/#/#aboutcode-org/fosdem-2024:gitter.im is the link copied But this is a dead, invalid link. It should have been matrix.to does not redirect correctly rooms with a slash. |
I am experiencing the same issue and I originally thought this was an Element problem. element-hq/element-desktop#1435 ... this makes life really difficult as the generated matrix.to links are useless and error out. So you cannot really share you room at all. |
as @Zocker1999NET pointed out the split is the issue. Here is a simple excerpt: function parseFragment(fragment) {
let [linkStr, queryParamsStr] = fragment.split("?");
linkStr = linkStr.slice(2);
const [identifier, eventId] = linkStr.split("/");
return {"identifier": identifier, "eventId": eventId};
}
parseFragment("/#aboutcode-org/vulnerablecode:gitter.im") returns:
But should have returned:
Also I could not find a tests for this function... are they in another repository may be? 😇 |
Neither unescaped (https://matrix.to/#/@it/sme:matrix.org) nor escaped (https://matrix.to/#/@it%2Fsme:matrix.org) links does not work. |
Also the error message is misleading because the URL is actually valid
|
Per the spec, MXIDs are allowed to contain forward slashes (
/
). However, matrix.to rejects such MXIDs:The text was updated successfully, but these errors were encountered: