Drupal provides a mechanism to alter database SELECT queries before they are executed. Contributed and custom modules may use this mechanism to restrict access to certain entities by implementing hook_query_alter() or hook_query_TAG_alter() in order to add additional conditions. Queries can be distinguished by means of query tags. As the documentation on EntityFieldQuery::addTag() suggests, access-tags on entity queries normally follow the form ENTITY_TYPE_access (e.g. node_access). However, the taxonomy module's access query tag predated this system and used term_access as the query tag instead of taxonomy_term_access.

As a result, before this security release modules wishing to restrict access to taxonomy terms may have implemented an unsupported tag, or needed to look for both tags (term_access and taxonomy_term_access) in order to be compatible with queries generated both by Drupal core as well as those generated by contributed modules like Entity Reference. Otherwise information on taxonomy terms might have been disclosed to unprivileged users.

https://www.drupal.org/SA-CORE-2016-005

Now it's backward compatible but it's planned Emit E_USER_DEPRECATED if term_access is used.

CommentFileSizeAuthor
search_api-SA-CORE-2016-005-1.patch1.15 KBjansete
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jansete created an issue. See original summary.

jansete’s picture

Issue summary: View changes

drunken monkey’s picture

Status: Needs review » Fixed
Related issues: +#2828378: Inconsistent name for term access query - SA-CORE-2016-005

Thanks a lot for reporting this issue!
I saw the SA, but didn't remember that we do have a query with term access in the Search API. Good catch!
Committed your patch. Thanks again!

(Also, linking to the Views issue with exactly the same problem – since we stole our code from there.)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.