Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

Extra parameters getting added to external avatars

Open tensor5g opened this issue 2 years ago • 1 comments

Description:

After the most recent update to Android was released which resolved #3362 . This is the request being generated for avatars: /api/avatar?rcusername=test?format=png&size=36undefined This is what it's configured to use /api/avatar?rcusername={username} It's adding extra parameters which the desktop isn't. This probably wouldn't be a problem if it didn't put a second "?" parameter after the first one which makes the request invalid. I can work around this by rearchitecting how my api takes requests, but it seems like a bug.

Environment Information:

  • Rocket.Chat Server Version: 4.6.2
  • Rocket.Chat App Version: 4.27.0
  • Device Name:
  • OS Version: Android 11

Steps to reproduce:

  1. Set an external avatar provider in server settings
  2. Open a chat which will load avatars
  3. View access logs on the avatar provider server and see that ?format=png&size=36undefined is being added to the end

Expected behavior:

Should not add extra parameters to the end of the URL

tensor5g avatar Apr 29 '22 13:04 tensor5g

Any update here? Issue is still present using latest mobile and server version.

tensor5g avatar Jul 22 '22 14:07 tensor5g

@tensor5g is it still an issue?

milton-rucks avatar Feb 08 '23 17:02 milton-rucks

@milton-rucks yes, ?format=png&size=36undefined is still being appended to the end of every remote avatar request, breaking them.

tensor5g avatar Feb 08 '23 23:02 tensor5g