Canvas image GET returns 401 in proxy mode (X-Hero-User parsed as u64, not external_id) #28
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_collab#28
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Every canvas image upload in proxy mode renders as a broken placeholder. DevTools shows:
Affects every proxy-mode user including the image's own uploader.
Root cause
attachment_http.rs::get_bytesparsedX-Hero-Userasu64. In proxy mode the header isexternal_id/email (a string), so parse fails →caller_id=None→check_attachment_accesshits the proxy-mode fail-closed branch → 401.The JSON-RPC dispatcher (
main.rs::handle_rpc) does the right thing (cache → external_id → email/alias). The HTTP attachment route never got the same treatment.Surfaced in
#10 dogfooding thread while testing canvas content with a freshly-created canvas + image upload as
viewer_test@example.com.Fix in
PR linked below.