element-web/src
Slavi Pantaleev 3f60b4336f Do not try to request thumbnails with non-integer widths
Issue described in https://github.com/vector-im/riot-web/issues/9690.

With certain `window.devicePixelRatio` values
(e.g.  `1.5789473684210527`), the calculated thumb width/height
would be a non-integer value.

Passing such values to `client.mxcUrlToHttp()` causes it to
generate URLs to the thumbnail API with non-integer values.
As per the spec, non-integer values are forbidden for that API and a
400 HTTP response is returned (`Query parameter b'width' must be an
integer`).

Fixing matrix-js-sdk's `mxcUrlToHttp()` to sanitize such values
would also be a good idea and likely fix more than just matrix-react-sdk
and riot-web. Still, it feels like matrix-react-sdk should play nice
as well, and not request thumbnails for weird widths/heights.

Signed-off-by: Slavi Pantaleev <slavi@devture.com>
2019-05-27 11:06:10 +03:00
..
actions
async-components/views/dialogs
autocomplete
components Do not try to request thumbnails with non-integer widths 2019-05-27 11:06:10 +03:00
editor
i18n/strings
notifications
rageshake
resizer
settings
stores
utils
wrappers
ActiveRoomObserver.js
AddThreepid.js
Analytics.js
Avatar.js
BasePlatform.js
CallHandler.js
CallMediaHandler.js
ComposerHistoryManager.js
ContentMessages.js
DateUtils.js
DecryptionFailureTracker.js
Entities.js
FromWidgetPostMessageApi.js
GroupAddressPicker.js
HtmlUtils.js
ImageUtils.js
IntegrationManager.js
KeyRequestHandler.js
Keyboard.js
Lifecycle.js
Login.js
Markdown.js
MatrixClientPeg.js
Modal.js
Notifier.js
ObjectUtils.js
PageTypes.js
PasswordReset.js
PhasedRollOut.js
PlatformPeg.js
Presence.js
Registration.js
Resend.js
Roles.js
RoomInvite.js
RoomListSorter.js
RoomNotifs.js
Rooms.js
ScalarAuthClient.js
ScalarMessaging.js
SdkConfig.js
Skinner.js
SlashCommands.js
TextForEvent.js
Tinter.js
ToWidgetPostMessageApi.js
Unread.js
UserActivity.js
UserAddress.js
VectorConferenceHandler.js
Velociraptor.js
VelocityBounce.js
WhoIsTyping.js
WidgetMessaging.js
WidgetMessagingEndpoint.js
createRoom.js
cryptodevices.js
dispatcher.js
email.js
extend.js
groups.js
index.js
languageHandler.js
linkify-matrix.js
matrix-to.js
phonenumber.js
ratelimitedfunc.js
shouldHideEvent.js
stripped-emoji.json