Refactor user.ID.ScriptHash() usage #1618

Merged
fyrchik merged 2 commits from elebedeva/frostfs-node:fix/sdk-user-id-scripthash into master 2025-01-30 13:18:38 +00:00
Member

Related to TrueCloudLab/frostfs-sdk-go#302

user.ID.ScriptHash() does not return an error anymore.

Signed-off-by: Ekaterina Lebedeva ekaterina.lebedeva@yadro.com

Related to TrueCloudLab/frostfs-sdk-go#302 `user.ID.ScriptHash()` does not return an error anymore. Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
requested reviews from storage-core-committers, storage-core-developers 2025-01-28 15:57:49 +00:00
elebedeva added the
refactoring
internal
labels 2025-01-28 15:59:02 +00:00
elebedeva changed title from Refactor user.ID.ScriptHash() usage to WIP: Refactor user.ID.ScriptHash() usage 2025-01-28 16:01:41 +00:00
elebedeva force-pushed fix/sdk-user-id-scripthash from f0e603785c to ec83958eb5 2025-01-28 16:02:42 +00:00 Compare
elebedeva force-pushed fix/sdk-user-id-scripthash from ec83958eb5 to 85f336466a 2025-01-29 14:33:20 +00:00 Compare
elebedeva changed title from WIP: Refactor user.ID.ScriptHash() usage to Refactor user.ID.ScriptHash() usage 2025-01-29 14:33:47 +00:00
dstepanov-yadro approved these changes 2025-01-29 14:48:51 +00:00
a-savchuk approved these changes 2025-01-29 14:52:12 +00:00
fyrchik approved these changes 2025-01-29 15:29:00 +00:00
@ -20,3 +20,3 @@
const (
testOwnerID = "FPPtmAi9TCX329"
testOwnerID = "NURFM8PWbLA2aLt2vrD8q4FyfAdgESwM8y"
Owner

Hm, why didn't our decoding function catch this earlier?

Hm, why didn't our decoding function catch this earlier?
Author
Member

user.ID was a byte slice and user.ID.DecodeString() didn't check length and format of byte slices decoded from strings.Also, in these tests testOwnerID was used only to decode container owner id and to compare it with owner id encoded back to string.

`user.ID` was a byte slice and `user.ID.DecodeString()` didn't check length and format of byte slices decoded from strings.Also, in these tests `testOwnerID` was used only to decode container owner id and to compare it with owner id encoded back to string.
fyrchik marked this conversation as resolved
elebedeva force-pushed fix/sdk-user-id-scripthash from 85f336466a to ae851b3922 2025-01-30 11:56:04 +00:00 Compare
fyrchik merged commit 24054cf6f4 into master 2025-01-30 13:18:38 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1618
No description provided.