system: You are an expert security code reviewer. You will be shown a source code file along with a multi-select question listing several CWE (Common Weakness Enumeration) categories. Your task is to identify which of the listed CWEs are present in the code.

OUTPUT FORMAT: Respond with the letter(s) of all correct options, sorted alphabetically and comma-separated, wrapped in a single \boxed{...}. Examples: `\boxed{A}` for one correct, `\boxed{A,C}` for two, `\boxed{A,C,E}` for three. Output the boxed answer ONLY -- no explanation, no other text.

user: ```python
"""
Generate static HTML files for eduid-IdP in all supported languages.
"""

import os
import sys
import six
import pkg_resources
from six.moves import configparser

from jinja2 import Environment, PackageLoader
from babel.support import Translations

__version__ = '0.1'
__copyright__ = 'SUNET'
__organization__ = 'SUNET'
__license__ = 'BSD'
__authors__ = ['Fredrik Thulin']

__all__ = [
]

_CONFIG_DEFAULTS = {'gettext_domain': 'eduid_IdP_html',
                    }


def translate_templates(env, loader, settings, verbose=False, debug=False):
    """
    Translate all templates available through `loader'.

    Returns a big dict with all the translated templates, in all languages :

    {'login.jinja2': {'en': string, 'sv': string, ...},
     'error.jinja2': ...
    }

    :param env: jinja2.Environment()
    :param loader: jinja2.BaseLoader()
    :param settings: dict with settings and variables available to the Jinja2 templates
    :param verbose: boolean, output to stdout or not
    :param debug: boolean, output debug information to stderr or not
    :return: dict with translated templates
    """
    languages = {}
    res = {}

    locale_dir = pkg_resources.resource_filename(__name__, 'locale')

    for lang in pkg_resources.resource_listdir(__name__, 'locale'):
        lang_dir = os.path.join(locale_dir, lang)
        if not os.path.isdir(lang_dir):
            if debug:
                sys.stderr.write("Not a directory: {!r}\n".format(lang_dir))
            continue
        if verbose:
            languages[lang] = 1

        translations = Translations.load(locale_dir, [lang], settings['gettext_domain'])
        env.install_gettext_translations(translations)

        for template_file in loader.list_templates():
            if template_file.endswith('.swp'):
                continue
            template = env.get_template(template_file)
            translated = template.render(settings=settings)

            if not template_file in res:
                res[template_file] = {}
            res[template_file][lang] = translated.encode('utf-8')

            if debug:
                sys.stderr.write("Lang={!s} :\n{!s}\n\n".format(lang, translated.encode('utf-8')))

    if verbose:
        print("\nLanguages : {!r}\nGenerated templates : {!r}\n".format(
            sorted(languages.keys()), sorted(res.keys())))

    return res


def load_settings(resource_name='settings.ini'):
    """
    Load settings from INI-file (package resource).

    All options from all sections are collapsed to one flat namespace.

    :param resource_name: string, name of package resource to load.
    :return: dict with settings
    """
    config = configparser.ConfigParser(_CONFIG_DEFAULTS)
    if six.PY2:
        config_fp = pkg_resources.resource_stream(__name__, resource_name)
        config.readfp(config_fp, resource_name)
    else:
        config_str = pkg_resources.resource_string(__name__, resource_name)
        config.read_string(config_str.decode('utf8'), resource_name)
    settings = {}
    for section in config.sections():
        for option in config.options(section):
            settings[option] = config.get(section, option)
    return settings


def save_to_files(translated, output_dir, verbose):
    """
    Save translated templates to files (with a .html extension).

    :param translated: dict (result of translate_templates() probably)
    :param output_dir: string, output path
    :param verbose: boolean, print status output to stdout or not
    """
    for template in translated.keys():
        template_html_fn = template
        if template_html_fn.endswith('.jinja2'):
            # remove '.jinja2' extension
            template_html_fn = template_html_fn[:len(template_html_fn) - len('.jinja2')]
        template_html_fn += '.html'
        for lang in translated[template].keys():
            lang_dir = os.path.join(output_dir, lang)
            try:
                os.stat(lang_dir)
            except OSError:
                os.mkdir(lang_dir)
            output_fn = os.path.join(lang_dir, template_html_fn)
            fp = open(output_fn, 'w')
            if six.PY2:
                fp.write(translated[template][lang])
            else:
                fp.write(translated[template][lang].decode('utf8'))
            fp.write("\n")  # eof newline disappears in Jinja2 rendering
            if verbose:
                print("Wrote {!r}".format(output_fn))
    if verbose:
        print("\n")


def main(verbose=False, output_dir=None):
    """
    Code executed when this module is started as a script.

    :param verbose: boolean, print status output to stdout/stderr or not
    :param output_dir: string, output path
    :return: boolean
    """
    settings = load_settings()
    if not settings:
        return False

    loader = PackageLoader(__name__)
    env = Environment(loader=loader,
                      extensions=['jinja2.ext.i18n',
                                  'jinja2.ext.autoescape',
                                  'jinja2.ext.with_',
                                  ],
                      )

    translated = translate_templates(env, loader, settings, verbose)

    if output_dir:
        save_to_files(translated, output_dir, verbose)

    return True

if __name__ == '__main__':
    if not main(verbose=True, output_dir="/tmp/foo"):
        sys.exit(1)
    sys.exit(0)

```

Which of the following CWE vulnerability categories are present in this code? Multiple options may be correct.

  A) CWE-312: Cleartext Storage of Sensitive Information
  B) CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  C) CWE-377: Insecure Temporary File
  D) CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
  E) CWE-326: Inadequate Encryption Strength
  F) CWE-943: Improper Neutralization of Special Elements in Data Query Logic
Answer: B