Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 6 years ago

#16986 closed defect (bug) (invalid)

wp.getOptions do'nt have a capability check

Reported by: nprasath002 Owned by:
Priority: normal Milestone:
Component: XML-RPC Version: 3.1
Severity: minor Keywords: has-patch
Cc: Focuses:

Description

This won't be a big problem with default options.
If the blog options are extended via a plugin this would be a problem.
Better to have a check,

Attachments (2)

getoptions.diff​ (583 bytes ) - added by nprasath002 16 years ago.
getoptions2.diff​ (617 bytes ) - added by ericmann 16 years ago.
Updated patch file to reference the file it's patching.

Download all attachments as: .zip

Change History (6)

#1 @ericmann
16 years ago

  • Component General → XML-RPC

Considering the default behavior of the options page in WordPress is to check the same permission, I agree.

Updating patch to reference the patched file.

@ericmann
16 years ago

Updated patch file to reference the file it's patching.

#2 @ericmann
16 years ago

  • Resolution → invalid
  • Status new → closed

Actually, after putting some thought into this, we shouldn't restrict options checking with a capability check. That would disallow remote applications from getting any options values unless the user had permission to manage options.

Think about how many times a site calls get_option() for unauthenticated users or for authors without options management privileges. wp.getOptions serves a similar purpose for remote apps; a capability check here isn't really appropriate.

#3 @nacin
16 years ago

  • Milestone Awaiting Review

Correct - a cap check is inappropriate here.

This ticket was mentioned in ​Slack in #core-editor by talldanwp. ​View the logs.


6 years ago

Note: See TracTickets for help on using tickets.