system: You are an expert security code reviewer. You will be shown a source code file along with a catalog of candidate CWE (Common Weakness Enumeration) categories with their official MITRE names. Your task is to list every distinct CWE from that catalog that is actually present in the code. The catalog is comprehensive for this dataset -- the answer is a (possibly small) subset of it.

OUTPUT FORMAT: Respond with a comma-separated list of CWE IDs in the form `CWE-N`, sorted in ascending numeric order, wrapped in a single \boxed{...}. Examples: `\boxed{CWE-79}` for one, `\boxed{CWE-22,CWE-79,CWE-327}` for three. Output the boxed answer ONLY -- no explanation, no other text.

user: ```python
# Copyright 2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Collection of helper functions."""

import urlparse

from google.appengine.ext import db

from codereview.exceptions import FetchError


def make_url(base, filename, rev):
  """Helper to construct the URL to fetch.

  Args:
    base: The base property of the Issue to which the Patch belongs.
    filename: The filename property of the Patch instance.
    rev: Revision number, or None for head revision.

  Returns:
    A URL referring to the given revision of the file.
  """
  scheme, netloc, path, _, _, _ = urlparse.urlparse(base)
  if netloc.endswith(".googlecode.com"):
    # Handle Google code repositories
    if rev is None:
      raise FetchError("Can't access googlecode.com without a revision")
    if not path.startswith("/svn/"):
      raise FetchError( "Malformed googlecode.com URL (%s)" % base)
    path = path[5:]  # Strip "/svn/"
    url = "%s://%s/svn-history/r%d/%s/%s" % (scheme, netloc, rev,
                                             path, filename)
    return url
  elif netloc.endswith("sourceforge.net") and rev is not None:
    if path.strip().endswith("/"):
      path = path.strip()[:-1]
    else:
      path = path.strip()
    splitted_path = path.split("/")
    url = "%s://%s/%s/!svn/bc/%d/%s/%s" % (scheme, netloc,
                                           "/".join(splitted_path[1:3]), rev,
                                           "/".join(splitted_path[3:]),
                                           filename)
    return url
  # Default for viewvc-based URLs (svn.python.org)
  url = base
  if not url.endswith('/'):
    url += '/'
  url += filename
  if rev is not None:
    url += '?rev=%s' % rev
  return url


def to_dbtext(text):
  """Helper to turn a string into a db.Text instance.

  Args:
    text: a string.

  Returns:
    A db.Text instance.
  """
  if isinstance(text, unicode):
    # A TypeError is raised if text is unicode and an encoding is given.
    return db.Text(text)
  else:
    try:
      return db.Text(text, encoding='utf-8')
    except UnicodeDecodeError:
      return db.Text(text, encoding='latin-1')


def unify_linebreaks(text):
  """Helper to return a string with all line breaks converted to LF.

  Args:
    text: a string.

  Returns:
    A string with all line breaks converted to LF.
  """
  return text.replace('\r\n', '\n').replace('\r', '\n')



```

Candidate CWE catalog (every CWE that appears anywhere in this dataset):
  - CWE-20: Improper Input Validation
  - CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  - CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  - CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  - CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  - CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
  - CWE-94: Improper Control of Generation of Code ('Code Injection')
  - CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')
  - CWE-116: Improper Encoding or Escaping of Output
  - CWE-117: Improper Output Neutralization for Logs
  - CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  - CWE-209: Generation of Error Message Containing Sensitive Information
  - CWE-215: Insertion of Sensitive Information Into Debugging Code
  - CWE-295: Improper Certificate Validation
  - CWE-312: Cleartext Storage of Sensitive Information
  - CWE-326: Inadequate Encryption Strength
  - CWE-327: Use of a Broken or Risky Cryptographic Algorithm
  - CWE-377: Insecure Temporary File
  - CWE-502: Deserialization of Untrusted Data
  - CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
  - CWE-611: Improper Restriction of XML External Entity Reference
  - CWE-614: Sensitive Cookie in HTTPS Session Without 'Secure' Attribute
  - CWE-643: Improper Neutralization of Data within XPath Expressions ('XPath Injection')
  - CWE-730: OWASP Top Ten 2004 Category A9 - Denial of Service
  - CWE-732: Incorrect Permission Assignment for Critical Resource
  - CWE-776: Improper Restriction of Recursive Entity References in DTDs ('XML Entity Expansion')
  - CWE-918: Server-Side Request Forgery (SSRF)
  - CWE-943: Improper Neutralization of Special Elements in Data Query Logic
  - CWE-1004: Sensitive Cookie Without 'HttpOnly' Flag
  - CWE-1333: Inefficient Regular Expression Complexity

List every distinct CWE from the catalog above that is actually present in this code.
Answer: CWE-20