Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts: Fix security for deprecation warning #28485

Merged
merged 3 commits into from
Feb 3, 2018

Commits on Feb 1, 2018

  1. Scripts: Fix security for deprecation warning

    If you call `getDates()` on a long or date type field add a deprecation
    warning to the response and log something to the deprecation logger.
    This *mostly* worked just fine but if the deprecation logger happens to
    roll then the roll will be performed with the script's permissions
    rather than the permissions of the server. And scripts don't have
    permissions to, say, open files. So the rolling failed. This fixes that
    by wrapping the call the deprecation logger in `doPriviledged`.
    
    This is a strange `doPrivileged` call because it doens't check
    Elasticsearch's `SpecialPermission`. `SpecialPermission` is a permission
    that no-script code has and that scripts never have. Usually all
    `doPrivileged` calls check `SpecialPermission` to make sure that they
    are not accidentally acting on behalf of a script. But in this case we
    are *intentionally* acting on behalf of a script.
    
    Closes elastic#28408
    nik9000 committed Feb 1, 2018
    Configuration menu
    Copy the full SHA
    4338753 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2018

  1. Configuration menu
    Copy the full SHA
    748c518 View commit details
    Browse the repository at this point in the history
  2. Explain

    nik9000 committed Feb 2, 2018
    Configuration menu
    Copy the full SHA
    a88f387 View commit details
    Browse the repository at this point in the history