Uploaded image for project: 'Sentry (Retired)'
  1. Sentry (Retired)
  2. SENTRY-1663

UpdateableAuthzPermissions has mutable static fields

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.0, 2.0.0
    • Component/s: Sentry
    • Labels:

      Description

      UpdateableAuthzPermissions has the following code:

        public static final Map<String, FsAction> ACTION_MAPPING = new HashMap<String, FsAction>();
        
        static {
          ACTION_MAPPING.put("ALL", FsAction.ALL);
          ACTION_MAPPING.put("*", FsAction.ALL);
          ACTION_MAPPING.put("SELECT", FsAction.READ_EXECUTE);
          ACTION_MAPPING.put("select", FsAction.READ_EXECUTE);
          ACTION_MAPPING.put("INSERT", FsAction.WRITE_EXECUTE);
          ACTION_MAPPING.put("insert", FsAction.WRITE_EXECUTE);
        }
      
      

      It should use ImmutableMap instead.

        Attachments

        1. SENTRY-1663.001.patch
          3 kB
          Jan Hentschel

          Issue Links

            Activity

              People

              • Assignee:
                janh Jan Hentschel
                Reporter:
                akolb Alex Kolbasov

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Issue deployment