Skip to content

Check weblog permission in XML-RPC Blogger/MetaWeblog handlers - #164

Open
snoopdave wants to merge 3 commits into
masterfrom
xmlrpc-weblog-permission-check
Open

Check weblog permission in XML-RPC Blogger/MetaWeblog handlers#164
snoopdave wants to merge 3 commits into
masterfrom
xmlrpc-weblog-permission-check

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

The Blogger and MetaWeblog XML-RPC handlers are Roller's legacy remote-publishing
API. This change makes them apply the same per-weblog and per-entry permission
model that the rest of Roller uses, so a caller is authorized against the weblog
or entry an operation actually touches.

What changed

  • Apply an explicit per-method permission matrix (weblog ADMIN / EDIT_DRAFT /
    POST, or entry-level write permission) to the weblog or entry actually
    touched.
  • getUserInfo returns only the authenticated user; getUsersBlogs returns only
    API-enabled member weblogs.
  • Entry-ID operations authorize against the entry's own weblog.
  • Foreign and unknown identifiers produce the same fault.
  • Bound the number of entries a recent-posts call scans for a limited member.

Tests

Table-driven integration suite over every exposed handler method: authorized
member, authenticated non-member, insufficient role, disabled user/weblog/API,
draft-to-published transition, filtered recent posts, category/weblog mismatch,
and foreign/absent resource identifiers.

A caller without POST permission now scans at most a fixed number of entries
rather than the whole weblog before the in-memory permission filter runs, and a
non-positive count returns nothing.

Claude-Session: https://claude.ai/code/session_01A1fhY1E2PCFU6UAPXu2WtV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant