prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [META 576] Sanitize `*auth*` instead of `authorization`
  [![issue details](https://img.shields.io/endpoint?label=meta-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F576)](https://github.com/elastic/apm/issues/576)
  
  [![issue details](https://img.shields.io/endpoint?label=spec-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F577)](https://github.com/elastic/apm/issues/577)
  
  Sanitize `*auth*` instead of `authorization`
  
  </issue>
  <code>
  [start of elasticapm/conf/constants.py]
  1 #  BSD 3-Clause License
  2 #
  3 #  Copyright (c) 2019, Elasticsearch BV
  4 #  All rights reserved.
  5 #
  6 #  Redistribution and use in source and binary forms, with or without
  7 #  modification, are permitted provided that the following conditions are met:
  8 #
  9 #  * Redistributions of source code must retain the above copyright notice, this
  10 #    list of conditions and the following disclaimer.
  11 #
  12 #  * Redistributions in binary form must reproduce the above copyright notice,
  13 #    this list of conditions and the following disclaimer in the documentation
  14 #    and/or other materials provided with the distribution.
  15 #
  16 #  * Neither the name of the copyright holder nor the names of its
  17 #    contributors may be used to endorse or promote products derived from
  18 #    this software without specific prior written permission.
  19 #
  20 #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21 #  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22 #  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  23 #  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  24 #  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25 #  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  26 #  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  27 #  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28 #  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30 
  31 import decimal
  32 import re
  33 from collections import namedtuple
  34 
  35 
  36 def _starmatch_to_regex(pattern):
  37     """
  38     This is a duplicate of starmatch_to_regex() in utils/__init__.py
  39 
  40     Duplication to avoid circular imports
  41     """
  42     options = re.DOTALL
  43     # check if we are case sensitive
  44     if pattern.startswith("(?-i)"):
  45         pattern = pattern[5:]
  46     else:
  47         options |= re.IGNORECASE
  48     i, n = 0, len(pattern)
  49     res = []
  50     while i < n:
  51         c = pattern[i]
  52         i = i + 1
  53         if c == "*":
  54             res.append(".*")
  55         else:
  56             res.append(re.escape(c))
  57     return re.compile(r"(?:%s)\Z" % "".join(res), options)
  58 
  59 
  60 EVENTS_API_PATH = "intake/v2/events"
  61 AGENT_CONFIG_PATH = "config/v1/agents"
  62 SERVER_INFO_PATH = ""
  63 
  64 TRACE_CONTEXT_VERSION = 0
  65 TRACEPARENT_HEADER_NAME = "traceparent"
  66 TRACEPARENT_LEGACY_HEADER_NAME = "elastic-apm-traceparent"
  67 TRACESTATE_HEADER_NAME = "tracestate"
  68 
  69 TIMESTAMP_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
  70 
  71 KEYWORD_MAX_LENGTH = 1024
  72 
  73 HTTP_WITH_BODY = {"POST", "PUT", "PATCH", "DELETE"}
  74 
  75 MASK = "[REDACTED]"
  76 
  77 EXCEPTION_CHAIN_MAX_DEPTH = 50
  78 
  79 ERROR = "error"
  80 TRANSACTION = "transaction"
  81 SPAN = "span"
  82 METRICSET = "metricset"
  83 
  84 LABEL_RE = re.compile('[.*"]')
  85 
  86 HARDCODED_PROCESSORS = ["elasticapm.processors.add_context_lines_to_frames"]
  87 
  88 BASE_SANITIZE_FIELD_NAMES_UNPROCESSED = [
  89     "password",
  90     "passwd",
  91     "pwd",
  92     "secret",
  93     "*key",
  94     "*token*",
  95     "*session*",
  96     "*credit*",
  97     "*card*",
  98     "authorization",
  99     "set-cookie",
  100 ]
  101 
  102 BASE_SANITIZE_FIELD_NAMES = [_starmatch_to_regex(x) for x in BASE_SANITIZE_FIELD_NAMES_UNPROCESSED]
  103 
  104 OUTCOME = namedtuple("OUTCOME", ["SUCCESS", "FAILURE", "UNKNOWN"])(
  105     SUCCESS="success", FAILURE="failure", UNKNOWN="unknown"
  106 )
  107 
  108 try:
  109     # Python 2
  110     LABEL_TYPES = (bool, int, long, float, decimal.Decimal)
  111 except NameError:
  112     # Python 3
  113     LABEL_TYPES = (bool, int, float, decimal.Decimal)
  114 
  115 TRACESTATE = namedtuple("TRACESTATE", ["SAMPLE_RATE"])(SAMPLE_RATE="s")
  116
  [end of elasticapm/conf/constants.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/elasticapm/conf/constants.py b/elasticapm/conf/constants.py
  --- a/elasticapm/conf/constants.py
  +++ b/elasticapm/conf/constants.py
  @@ -95,7 +95,7 @@
       "*session*",
       "*credit*",
       "*card*",
  -    "authorization",
  +    "*auth*",
       "set-cookie",
   ]
  
verification_info: {"golden_diff": "diff --git a/elasticapm/conf/constants.py b/elasticapm/conf/constants.py\n--- a/elasticapm/conf/constants.py\n+++ b/elasticapm/conf/constants.py\n@@ -95,7 +95,7 @@\n     \"*session*\",\n     \"*credit*\",\n     \"*card*\",\n-    \"authorization\",\n+    \"*auth*\",\n     \"set-cookie\",\n ]\n", "issue": "[META 576] Sanitize `*auth*` instead of `authorization`\n[![issue details](https://img.shields.io/endpoint?label=meta-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F576)](https://github.com/elastic/apm/issues/576)\n\n[![issue details](https://img.shields.io/endpoint?label=spec-issue:&url=https%3A%2F%2Fgiss.app.elstc.co%2Fapi%2Fstatus%2Felastic%2Fapm%2F577)](https://github.com/elastic/apm/issues/577)\n\nSanitize `*auth*` instead of `authorization`\n", "before_files": [{"content": "#  BSD 3-Clause License\n#\n#  Copyright (c) 2019, Elasticsearch BV\n#  All rights reserved.\n#\n#  Redistribution and use in source and binary forms, with or without\n#  modification, are permitted provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this\n#    list of conditions and the following disclaimer.\n#\n#  * Redistributions in binary form must reproduce the above copyright notice,\n#    this list of conditions and the following disclaimer in the documentation\n#    and/or other materials provided with the distribution.\n#\n#  * Neither the name of the copyright holder nor the names of its\n#    contributors may be used to endorse or promote products derived from\n#    this software without specific prior written permission.\n#\n#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n#  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n#  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n#  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n#  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n#  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n#  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport decimal\nimport re\nfrom collections import namedtuple\n\n\ndef _starmatch_to_regex(pattern):\n    \"\"\"\n    This is a duplicate of starmatch_to_regex() in utils/__init__.py\n\n    Duplication to avoid circular imports\n    \"\"\"\n    options = re.DOTALL\n    # check if we are case sensitive\n    if pattern.startswith(\"(?-i)\"):\n        pattern = pattern[5:]\n    else:\n        options |= re.IGNORECASE\n    i, n = 0, len(pattern)\n    res = []\n    while i < n:\n        c = pattern[i]\n        i = i + 1\n        if c == \"*\":\n            res.append(\".*\")\n        else:\n            res.append(re.escape(c))\n    return re.compile(r\"(?:%s)\\Z\" % \"\".join(res), options)\n\n\nEVENTS_API_PATH = \"intake/v2/events\"\nAGENT_CONFIG_PATH = \"config/v1/agents\"\nSERVER_INFO_PATH = \"\"\n\nTRACE_CONTEXT_VERSION = 0\nTRACEPARENT_HEADER_NAME = \"traceparent\"\nTRACEPARENT_LEGACY_HEADER_NAME = \"elastic-apm-traceparent\"\nTRACESTATE_HEADER_NAME = \"tracestate\"\n\nTIMESTAMP_FORMAT = \"%Y-%m-%dT%H:%M:%S.%fZ\"\n\nKEYWORD_MAX_LENGTH = 1024\n\nHTTP_WITH_BODY = {\"POST\", \"PUT\", \"PATCH\", \"DELETE\"}\n\nMASK = \"[REDACTED]\"\n\nEXCEPTION_CHAIN_MAX_DEPTH = 50\n\nERROR = \"error\"\nTRANSACTION = \"transaction\"\nSPAN = \"span\"\nMETRICSET = \"metricset\"\n\nLABEL_RE = re.compile('[.*\"]')\n\nHARDCODED_PROCESSORS = [\"elasticapm.processors.add_context_lines_to_frames\"]\n\nBASE_SANITIZE_FIELD_NAMES_UNPROCESSED = [\n    \"password\",\n    \"passwd\",\n    \"pwd\",\n    \"secret\",\n    \"*key\",\n    \"*token*\",\n    \"*session*\",\n    \"*credit*\",\n    \"*card*\",\n    \"authorization\",\n    \"set-cookie\",\n]\n\nBASE_SANITIZE_FIELD_NAMES = [_starmatch_to_regex(x) for x in BASE_SANITIZE_FIELD_NAMES_UNPROCESSED]\n\nOUTCOME = namedtuple(\"OUTCOME\", [\"SUCCESS\", \"FAILURE\", \"UNKNOWN\"])(\n    SUCCESS=\"success\", FAILURE=\"failure\", UNKNOWN=\"unknown\"\n)\n\ntry:\n    # Python 2\n    LABEL_TYPES = (bool, int, long, float, decimal.Decimal)\nexcept NameError:\n    # Python 3\n    LABEL_TYPES = (bool, int, float, decimal.Decimal)\n\nTRACESTATE = namedtuple(\"TRACESTATE\", [\"SAMPLE_RATE\"])(SAMPLE_RATE=\"s\")\n", "path": "elasticapm/conf/constants.py"}]}