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

Deprecated use of substr in googleTranslate.ts

Open jpulattie opened this issue 1 year ago • 5 comments

There is a deprecated use of substr() in /apps/meteor/app/autotranslate/server/googleTranslate.ts that I found while doing a code review for a college class.

It isn't necessarily a bug or vulnerability in the code, not a new feature, but perhaps a code improvement.

The use of substr is in line 134 and 181, which I believe would be easily updated to slice(). I would volunteer to update this if the maintainers would like this to be updated.

jpulattie avatar Nov 20 '24 00:11 jpulattie

I think this is you.

https://forums.rocket.chat/t/contributing-but-not-a-bug-or-vulnerability/20975

I will refer this to the team but it will probably be handled internally. Someone will let you know.

reetp avatar Nov 20 '24 11:11 reetp

Is anyone currently working on this issue? If not, may I take it?

thepiyush-303 avatar Nov 21 '24 13:11 thepiyush-303

Is anyone currently working on this issue? If not, may I take it?

I will refer this to the team but it will probably be handled internally. Someone will let you know. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

reetp avatar Nov 21 '24 14:11 reetp

If you want to give it a go with a PR, please do jpulattie. Will be nice =)

casalsgh avatar Nov 21 '24 20:11 casalsgh

Actually, the use of substr() is in various other files too, so I think we should replace it everywhere else too. Edit: Referenced in PR #34120

Arihant25 avatar Dec 05 '24 04:12 Arihant25