-
Notifications
You must be signed in to change notification settings - Fork 94
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
fix(imageview): Don't try to load unresolved images #5655
Conversation
759b8d4
to
99e7a7a
Compare
Signed-off-by: Joas Schilling <coding@schilljs.com>
99e7a7a
to
ec99e9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be enough for a fix. Waiting for maintainers input
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this. Code change looks good and matches the description. Let's get this in.
/backport to stable29 |
📝 Summary
Currently a lot of people on our instance get bruteforce protected in Talk regularly. After some log reading it seems to always happen when interactive widgets are involved.
After some trying the smallest possible test is:
.attachment
links with wrong file ids)/f/...
link and post it into a chatindex.php/call/undefined
After some debugging I found this trace. The problem is the "default" resolver responds:
text/src/components/Editor.provider.js
Lines 91 to 94 in 648cf20
This means that
text/src/nodes/ImageView.vue
Line 245 in 99e7a7a
makes
this.attachment = [this.src]
in the Promise it sets
img.src = this.attachment.previewUrl
butpreviewUrl
is undefined as only0
exists.This will make the browser load
undefined
relative to the current page which results inhttps://localhost/index.php/call/undefined
This however looks like you are trying to open a conversation with the token
undefined
, but you have no access to it => bruteforce registered.by simply checking if
previewUrl
exists and otherwise jumping into the fail mode, it prevents the request to loadindex.php/call/undefined
and so also no bruteforce attempt it registered.🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)