Skip to content

refactor: remove guest access from the get_site_name Frappe endpoint so the inte - #243

Draft
esafwan wants to merge 1 commit into
developfrom
task/SweepSecurity-SEC-24-impl-1
Draft

refactor: remove guest access from the get_site_name Frappe endpoint so the inte#243
esafwan wants to merge 1 commit into
developfrom
task/SweepSecurity-SEC-24-impl-1

Conversation

@esafwan

@esafwan esafwan commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What it does / Summary

Removes guest access from the get_site_name Frappe REST API endpoint in ury/ury/api/ury_kot_display.py by removing allow_guest=True.

What it solves / Motivation

  • Resolves security finding SEC-24 by preventing unauthenticated access to internal tenant/site names.
  • Enforces authentication while preserving compatibility for valid authenticated callers (e.g., KOT display UI using session cookies).

Key Technical Changes

  • ury/ury/api/ury_kot_display.py:
    • Changed @frappe.whitelist(allow_guest=True) to @frappe.whitelist().

The get_site_name whitelisted method leaked the internal tenant/site
name to unauthenticated callers via allow_guest=True. It is now only
available to authenticated sessions; the URYMosaic KOT display calls
it with the user's session cookie, so authenticated usage is unaffected.
@esafwan esafwan changed the title Remove guest access from the get_site_name Frappe endpoint so the inte refactor: remove guest access from the get_site_name Frappe endpoint so the inte Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant