You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "atharvalade (via GitHub)" <gi...@apache.org> on 2026/03/19 09:08:00 UTC

[I] Go SDK: UpdatePermissions omits mandatory `permissions_len` field when permissions are nil [iggy]

atharvalade opened a new issue, #2982:
URL: https://github.com/apache/iggy/issues/2982

   Same root cause as the `CreateUser` issue. The Rust wire format for `UpdatePermissions` always includes `permissions_len:u32_le` on the wire regardless of `has_permissions` (see [update_permissions.rs#L37-L39](https://github.com/apache/iggy/blob/master/core/binary_protocol/src/requests/users/update_permissions.rs#L37-L39) and the decoder at [lines 64-65](https://github.com/apache/iggy/blob/master/core/binary_protocol/src/requests/users/update_permissions.rs#L64-L65)).
   
   In the Go SDK (`foreign/go/internal/command/user.go`), the nil-permissions path writes only the flag byte:
   
   ```
   } else {
       bytes[position] = 0 // missing permissions_len after this
   }
   ```
   
   Note: #2973 partially fixes this function — it adds +1 to the base length to prevent a panic when permissions are nil. But the output is still 4 bytes short of what the server expects.
   
   Fix: Change the base length from len(userIdBytes) + 1 to len(userIdBytes) + 1 + 4, and write 4 zero bytes for permissions_len in the else branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Go SDK: UpdatePermissions omits mandatory `permissions_len` field when permissions are nil [iggy]

Posted by "atharvalade (via GitHub)" <gi...@apache.org>.
atharvalade commented on issue #2982:
URL: https://github.com/apache/iggy/issues/2982#issuecomment-4088756171

   Please assign this to me


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org