<commit_before><?php
require_once('../global_functions.php');
require_once('../connections/parameters.php');

try {
    if (!isset($_SESSION)) {
        session_start();
    }

    if (isset($_COOKIE['session']) && empty($_SESSION['user_id64'])) {
        checkLogin_v2();
    }

    if (!empty($_SESSION['user_id64'])) {
        $db = new dbWrapper_v2($hostname_gds_site, $username_gds_site, $password_gds_site, $database_gds_site);
        if ($db) {
            if (!empty($_POST['mod_name'])) {
                $modName = $db->escape($_POST['mod_name']);

                $modDesc = !empty($_POST['mod_description'])
                    ? $db->escape($_POST['mod_description'])
                    : 'No description given.';

                $modWork = !empty($_POST['mod_workshop_link'])
                    ? $db->escape($_POST['mod_workshop_link'])
                    : NULL;

                $modGroup = !empty($_POST['mod_steam_group'])
                    ? $db->escape($_POST['mod_steam_group'])
                    : NULL;


                $config = array(
                    "digest_alg" => "sha512",
                    "private_key_bits" => 1024,<commit_msg>Fix XSS vulnerability<commit_after><?php
require_once('../global_functions.php');
require_once('../connections/parameters.php');

try {
    if (!isset($_SESSION)) {
        session_start();
    }

    if (isset($_COOKIE['session']) && empty($_SESSION['user_id64'])) {
        checkLogin_v2();
    }

    if (!empty($_SESSION['user_id64'])) {
        $db = new dbWrapper_v2($hostname_gds_site, $username_gds_site, $password_gds_site, $database_gds_site);
        if ($db) {
            if (!empty($_POST['mod_name'])) {
                $modName = htmlentities($_POST['mod_name']);

                $modDesc = !empty($_POST['mod_description'])
                    ? htmlentities($_POST['mod_description'])
                    : 'No description given.';

                $modWork = !empty($_POST['mod_workshop_link'])
                    ? htmlentities($_POST['mod_workshop_link'])
                    : NULL;

                $modGroup = !empty($_POST['mod_steam_group'])
                    ? htmlentities($_POST['mod_steam_group'])
                    : NULL;


                $config = array(
                    "digest_alg" => "sha512",
                    "private_key_bits" => 1024,
{'fraction_non_alphanumeric': 0.16159052453468697, 'fraction_numerical': 0.010998307952622674, 'mean_word_length': 2.0127388535031847, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5290537', 'n_tokens_mistral': 721, 'n_tokens_neox': 667, 'n_words': 91}