id
stringlengths
28
33
content
stringlengths
14
265k
max_stars_repo_path
stringlengths
49
55
crossvul-python_data_bad_1224_1
404: Not Found
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_1
crossvul-python_data_bad_3760_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3760_0
crossvul-python_data_bad_650_1
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_650_1
crossvul-python_data_good_650_0
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
./CrossVul/dataset_final_sorted/CWE-287/py/good_650_0
crossvul-python_data_good_649_1
# Copyright (c) 2013-2017 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
./CrossVul/dataset_final_sorted/CWE-287/py/good_649_1
crossvul-python_data_bad_3758_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # Copyright 2012 Canonical Ltd. # # 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/lice...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3758_0
crossvul-python_data_bad_3762_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3762_0
crossvul-python_data_good_3758_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # Copyright 2012 Canonical Ltd. # # 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/lice...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3758_0
crossvul-python_data_good_3762_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3762_0
crossvul-python_data_good_4331_0
import sys import ldap # pylint: disable=import-error from flask import current_app, jsonify, request from flask_cors import cross_origin from alerta.auth.utils import create_token, get_customers from alerta.exceptions import ApiError from alerta.models.permission import Permission from alerta.models.user import Use...
./CrossVul/dataset_final_sorted/CWE-287/py/good_4331_0
crossvul-python_data_good_3760_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3760_0
crossvul-python_data_good_1224_4
# -*- coding: utf-8 -*- from typing import List, Dict, Optional from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, get_backends from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponse, HttpRequest from dja...
./CrossVul/dataset_final_sorted/CWE-287/py/good_1224_4
crossvul-python_data_good_650_1
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
./CrossVul/dataset_final_sorted/CWE-287/py/good_650_1
crossvul-python_data_bad_4331_1
from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union from uuid import uuid4 from flask import g from alerta.app import db from alerta.database.base import Query from alerta.models.enums import ChangeType, NoteType from alerta.models.history import History from alerta.utils.format i...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_4331_1
crossvul-python_data_bad_2505_4
# -*- coding: utf-8 -*- from typing import Any, List, Dict, Mapping, Optional, Text from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, get_backends from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, H...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_2505_4
crossvul-python_data_bad_650_0
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_650_0
crossvul-python_data_good_1224_6
# Documentation for Zulip's authentication backends is split across a few places: # # * https://zulip.readthedocs.io/en/latest/production/authentication-methods.html and # zproject/prod_settings_template.py have user-level configuration documentation. # * https://zulip.readthedocs.io/en/latest/development/authenticat...
./CrossVul/dataset_final_sorted/CWE-287/py/good_1224_6
crossvul-python_data_good_4354_0
import os import time import json from secrets import token_bytes, token_hex, randbits from hashlib import sha256 import asyncio import aiosqlite as sql from responses import * class Database: def __init__(self, session): loop = asyncio.get_event_loop() # lock to prevent race conditions when SELECT...
./CrossVul/dataset_final_sorted/CWE-287/py/good_4354_0
crossvul-python_data_good_1224_1
# -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2019-10-16 22:48 from __future__ import unicode_literals from django.conf import settings from django.contrib.auth import get_backends from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db....
./CrossVul/dataset_final_sorted/CWE-287/py/good_1224_1
crossvul-python_data_good_3759_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # Copyright 2012 Canonical Ltd. # # 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/lice...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3759_0
crossvul-python_data_bad_1224_0
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from typing import List, TYPE_CHECKING from zulint.custom_rules import RuleList if TYPE_CHECKING: from zulint.custom_rules import Rule # Rule help: # By default, a rule applies to all files within the extension ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_0
crossvul-python_data_bad_3757_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3757_0
crossvul-python_data_good_3282_0
#!/usr/bin/python from k5test import * # Skip this test if pkinit wasn't built. if not os.path.exists(os.path.join(plugins, 'preauth', 'pkinit.so')): skip_rest('PKINIT tests', 'PKINIT module not built') # Check if soft-pkcs11.so is available. try: import ctypes lib = ctypes.LibraryLoader(ctypes.CDLL).Load...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3282_0
crossvul-python_data_bad_1224_4
# -*- coding: utf-8 -*- from typing import List, Dict, Optional from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, get_backends from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponse, HttpRequest from dja...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_4
crossvul-python_data_good_3761_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3761_0
crossvul-python_data_bad_1224_6
# Documentation for Zulip's authentication backends is split across a few places: # # * https://zulip.readthedocs.io/en/latest/production/authentication-methods.html and # zproject/prod_settings_template.py have user-level configuration documentation. # * https://zulip.readthedocs.io/en/latest/development/authenticat...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_6
crossvul-python_data_bad_4354_0
import os import time import json from secrets import token_bytes, token_hex, randbits from hashlib import sha256 import asyncio import aiosqlite as sql from responses import * class Database: def __init__(self, session): loop = asyncio.get_event_loop() # lock to prevent race conditions when SELECT...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_4354_0
crossvul-python_data_bad_1224_5
from typing import Union, Optional, Dict, Any, List import ujson from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from django.shortcuts import redirect, render from django.conf import settings from zerver.decorator import require_realm_admin, require_member_or_admi...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_5
crossvul-python_data_bad_1224_2
404: Not Found
./CrossVul/dataset_final_sorted/CWE-287/py/bad_1224_2
crossvul-python_data_bad_3759_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # Copyright 2012 Canonical Ltd. # # 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/lice...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3759_0
crossvul-python_data_bad_649_1
# Copyright (c) 2013-2017 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_649_1
crossvul-python_data_good_2920_0
# Copyright (c) 2010-2012 OpenStack, LLC. # # 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 ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_2920_0
crossvul-python_data_bad_3761_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_3761_0
crossvul-python_data_good_4331_1
from datetime import datetime from typing import Any, Dict, List, Optional, Tuple, Union from uuid import uuid4 from flask import g from alerta.app import db from alerta.database.base import Query from alerta.models.enums import ChangeType, NoteType from alerta.models.history import History from alerta.utils.format i...
./CrossVul/dataset_final_sorted/CWE-287/py/good_4331_1
crossvul-python_data_bad_2920_0
# Copyright (c) 2010-2012 OpenStack, LLC. # # 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 ...
./CrossVul/dataset_final_sorted/CWE-287/py/bad_2920_0
crossvul-python_data_good_3757_0
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 requ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_3757_0
crossvul-python_data_good_2505_4
# -*- coding: utf-8 -*- from typing import Any, List, Dict, Mapping, Optional, Text from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, get_backends from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, H...
./CrossVul/dataset_final_sorted/CWE-287/py/good_2505_4
crossvul-python_data_good_1224_0
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from typing import List, TYPE_CHECKING from zulint.custom_rules import RuleList if TYPE_CHECKING: from zulint.custom_rules import Rule # Rule help: # By default, a rule applies to all files within the extension ...
./CrossVul/dataset_final_sorted/CWE-287/py/good_1224_0
crossvul-python_data_good_275_0
# Copyright Red Hat 2017, Jake Hunsaker <jhunsake@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This pr...
./CrossVul/dataset_final_sorted/CWE-276/py/good_275_0
crossvul-python_data_bad_275_0
# Copyright Red Hat 2017, Jake Hunsaker <jhunsake@redhat.com> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This pr...
./CrossVul/dataset_final_sorted/CWE-276/py/bad_275_0
crossvul-python_data_bad_1020_0
# Copyright 2019, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
./CrossVul/dataset_final_sorted/CWE-254/py/bad_1020_0
crossvul-python_data_good_1020_0
# Copyright 2019, David Wilson # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2....
./CrossVul/dataset_final_sorted/CWE-254/py/good_1020_0
crossvul-python_data_bad_4859_1
import base64 import os import time from gluon import portalocker from gluon.admin import apath from gluon.fileutils import read_file from gluon.utils import web2py_uuid # ########################################################### # ## make sure administrator is on localhost or https # ################################...
./CrossVul/dataset_final_sorted/CWE-254/py/bad_4859_1
crossvul-python_data_good_5219_3
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
./CrossVul/dataset_final_sorted/CWE-254/py/good_5219_3
crossvul-python_data_good_4859_0
# -*- coding: utf-8 -*- EXPERIMENTAL_STUFF = True MAXNFILES = 1000 if EXPERIMENTAL_STUFF: if is_mobile: response.view = response.view.replace('default/', 'default.mobile/') response.menu = [] import re from gluon.admin import * from gluon.fileutils import abspath, read_file, write_file from gluon...
./CrossVul/dataset_final_sorted/CWE-254/py/good_4859_0
crossvul-python_data_bad_4859_0
# -*- coding: utf-8 -*- EXPERIMENTAL_STUFF = True MAXNFILES = 1000 if EXPERIMENTAL_STUFF: if is_mobile: response.view = response.view.replace('default/', 'default.mobile/') response.menu = [] import re from gluon.admin import * from gluon.fileutils import abspath, read_file, write_file from gluon...
./CrossVul/dataset_final_sorted/CWE-254/py/bad_4859_0
crossvul-python_data_good_4859_1
import base64 import os import time from gluon import portalocker from gluon.admin import apath from gluon.fileutils import read_file from gluon.utils import web2py_uuid # ########################################################### # ## make sure administrator is on localhost or https # ################################...
./CrossVul/dataset_final_sorted/CWE-254/py/good_4859_1
crossvul-python_data_bad_5219_3
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
./CrossVul/dataset_final_sorted/CWE-254/py/bad_5219_3
crossvul-python_data_good_1654_5
# -*- coding: utf-8 -*- from __future__ import with_statement from django.contrib.sites.models import Site from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.models import Text from django.core.cache import cache from django.core.management.base import CommandError from django.core.management im...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1654_5
crossvul-python_data_bad_1891_2
# -*- coding: utf-8 -*- """ flask_security.views ~~~~~~~~~~~~~~~~~~~~ Flask-Security views module :copyright: (c) 2012 by Matt Wright. :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. CSRF is tricky. By default all our forms have CSRF...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1891_2
crossvul-python_data_good_1686_0
"""Base Tornado handlers for the notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import os import re import sys import traceback try: # py3 from http.client import responses except ImportError: from httpl...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1686_0
crossvul-python_data_bad_114_5
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_5
crossvul-python_data_bad_1654_4
# -*- coding: utf-8 -*- from __future__ import with_statement import json import datetime from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admin.models import LogE...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1654_4
crossvul-python_data_bad_114_1
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_1
crossvul-python_data_bad_114_4
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_4
crossvul-python_data_good_114_3
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # Copyright 2015-2018 Antoni Boucher (antoyo) <bouanto@zoho.com> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the ter...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_3
crossvul-python_data_good_114_2
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_2
crossvul-python_data_bad_114_2
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_2
crossvul-python_data_good_114_0
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_0
crossvul-python_data_bad_1654_0
# -*- coding: utf-8 -*- import copy from functools import wraps import json import sys import django from django.contrib.admin.helpers import AdminForm from django.conf import settings from django.contrib import admin, messages from django.contrib.admin.models import LogEntry, CHANGE from django.contrib.admin.options ...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1654_0
crossvul-python_data_good_1654_0
# -*- coding: utf-8 -*- import copy from functools import wraps import json import sys import django from django.contrib.admin.helpers import AdminForm from django.conf import settings from django.contrib import admin, messages from django.contrib.admin.models import LogEntry, CHANGE from django.contrib.admin.options ...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1654_0
crossvul-python_data_good_1654_4
# -*- coding: utf-8 -*- from __future__ import with_statement import json import datetime from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admin.models import LogE...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1654_4
crossvul-python_data_good_114_1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_1
crossvul-python_data_good_1687_0
"""Base Tornado handlers for the notebook. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as p...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1687_0
crossvul-python_data_bad_1891_4
# -*- coding: utf-8 -*- """Simple security for Flask apps.""" import io import re from setuptools import find_packages, setup with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() with io.open("flask_security/__init__.py", "rt", encoding="utf8") as f: version = re.search(r'__version__ = ...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1891_4
crossvul-python_data_bad_1654_5
# -*- coding: utf-8 -*- from __future__ import with_statement from django.contrib.sites.models import Site from cms.utils.urlutils import admin_reverse from djangocms_text_ckeditor.models import Text from django.core.cache import cache from django.core.management.base import CommandError from django.core.management im...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1654_5
crossvul-python_data_bad_114_3
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_3
crossvul-python_data_good_1891_4
# -*- coding: utf-8 -*- """Simple security for Flask apps.""" import io import re from setuptools import find_packages, setup with io.open("README.rst", "rt", encoding="utf8") as f: readme = f.read() with io.open("flask_security/__init__.py", "rt", encoding="utf8") as f: version = re.search(r'__version__ = ...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1891_4
crossvul-python_data_bad_1686_0
"""Base Tornado handlers for the notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import logging import os import re import sys import traceback try: # py3 from http.client import responses except ImportError:...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1686_0
crossvul-python_data_good_1892_0
# -*- coding: utf-8 -*- """ flask_security.views ~~~~~~~~~~~~~~~~~~~~ Flask-Security views module :copyright: (c) 2012 by Matt Wright. :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. CSRF is tricky. By default all our forms have CSRF...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1892_0
crossvul-python_data_good_114_4
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_4
crossvul-python_data_good_114_5
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-352/py/good_114_5
crossvul-python_data_bad_1687_0
"""Base Tornado handlers for the notebook. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as p...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1687_0
crossvul-python_data_bad_114_0
404: Not Found
./CrossVul/dataset_final_sorted/CWE-352/py/bad_114_0
crossvul-python_data_good_1891_2
# -*- coding: utf-8 -*- """ flask_security.views ~~~~~~~~~~~~~~~~~~~~ Flask-Security views module :copyright: (c) 2012 by Matt Wright. :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. CSRF is tricky. By default all our forms have CSRF...
./CrossVul/dataset_final_sorted/CWE-352/py/good_1891_2
crossvul-python_data_bad_1892_0
# -*- coding: utf-8 -*- """ flask_security.views ~~~~~~~~~~~~~~~~~~~~ Flask-Security views module :copyright: (c) 2012 by Matt Wright. :copyright: (c) 2019-2020 by J. Christopher Wagner (jwag). :license: MIT, see LICENSE for more details. CSRF is tricky. By default all our forms have CSRF...
./CrossVul/dataset_final_sorted/CWE-352/py/bad_1892_0
crossvul-python_data_bad_40_0
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_40_0
crossvul-python_data_good_1644_3
"""Tornado handlers for the contents web service.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import json from tornado import gen, web from IPython.html.utils import url_path_join, url_escape from IPython.utils.jsonutil import date_default from IPython.ht...
./CrossVul/dataset_final_sorted/CWE-79/py/good_1644_3
crossvul-python_data_bad_1729_0
# coding: utf-8 """A tornado based IPython notebook server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import, print_function import base64 import datetime import errno import importlib import io import json import logging i...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_1729_0
crossvul-python_data_bad_4208_1
# -*- coding: iso-8859-1 -*- """ MoinMoin - Multiple configuration handler and Configuration defaults class @copyright: 2000-2004 Juergen Hermann <jh@web.de>, 2005-2008 MoinMoin:ThomasWaldmann. 2008 MoinMoin:JohannesBerg @license: GNU GPL, see COPYING for details. """ ...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_4208_1
crossvul-python_data_good_41_0
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
./CrossVul/dataset_final_sorted/CWE-79/py/good_41_0
crossvul-python_data_good_4208_0
# -*- coding: iso-8859-1 -*- """ MoinMoin - site-wide configuration defaults (NOT per single wiki!) @copyright: 2005-2006 MoinMoin:ThomasWaldmann @license: GNU GPL, see COPYING for details. """ import re from MoinMoin import version # unicode: set the char types (upper, lower, digits, spaces) from MoinMoi...
./CrossVul/dataset_final_sorted/CWE-79/py/good_4208_0
crossvul-python_data_bad_5730_0
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.forms.widgets import RadioFieldRenderer from django.for...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_5730_0
crossvul-python_data_bad_1645_0
"""Base Tornado handlers for the notebook. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as p...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_1645_0
crossvul-python_data_bad_3890_2
404: Not Found
./CrossVul/dataset_final_sorted/CWE-79/py/bad_3890_2
crossvul-python_data_good_5729_0
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.forms.widgets import RadioFieldRenderer from django.for...
./CrossVul/dataset_final_sorted/CWE-79/py/good_5729_0
crossvul-python_data_bad_4208_0
# -*- coding: iso-8859-1 -*- """ MoinMoin - site-wide configuration defaults (NOT per single wiki!) @copyright: 2005-2006 MoinMoin:ThomasWaldmann @license: GNU GPL, see COPYING for details. """ import re from MoinMoin import version # unicode: set the char types (upper, lower, digits, spaces) from MoinMoi...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_4208_0
crossvul-python_data_bad_1644_1
"""Tornado handlers for cluster web service.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import json from tornado import web from ...base.handlers import IPythonHandler #----------------------------------------------------------------------------- # Clust...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_1644_1
crossvul-python_data_bad_5191_3
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import tempfile from django import forms from django.conf.urls import url from django.contrib import admin from django.contrib.admin import BooleanFieldListFilter from django.contrib.admin.views.main import ChangeList from django.contrib.auth.a...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_5191_3
crossvul-python_data_good_5788_1
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: # Python 2 import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate fro...
./CrossVul/dataset_final_sorted/CWE-79/py/good_5788_1
crossvul-python_data_bad_5190_4
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile import uuid from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from d...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_5190_4
crossvul-python_data_good_1091_1
# -*- coding: utf-8 -*- from django.http import HttpRequest, HttpResponse, HttpResponseForbidden, \ HttpResponseNotFound from django.shortcuts import redirect from django.utils.translation import ugettext as _ from zerver.lib.response import json_success, json_error from zerver.lib.upload import upload_message_im...
./CrossVul/dataset_final_sorted/CWE-79/py/good_1091_1
crossvul-python_data_good_1729_0
# coding: utf-8 """A tornado based IPython notebook server.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import absolute_import, print_function import base64 import datetime import errno import importlib import io import json import logging i...
./CrossVul/dataset_final_sorted/CWE-79/py/good_1729_0
crossvul-python_data_good_5190_4
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import tempfile import uuid from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from d...
./CrossVul/dataset_final_sorted/CWE-79/py/good_5190_4
crossvul-python_data_good_1644_4
"""Tornado handlers for kernels.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import json import logging from tornado import gen, web from tornado.concurrent import Future from tornado.ioloop import IOLoop from IPython.utils.jsonutil import date_default from...
./CrossVul/dataset_final_sorted/CWE-79/py/good_1644_4
crossvul-python_data_good_1644_10
import json from tornado import web, gen from ..base.handlers import APIHandler, json_errors from ..utils import url_path_join class TerminalRootHandler(APIHandler): @web.authenticated @json_errors def get(self): tm = self.terminal_manager terms = [{'name': name} for name in tm.terminals] ...
./CrossVul/dataset_final_sorted/CWE-79/py/good_1644_10
crossvul-python_data_bad_1644_0
"""Base Tornado handlers for the notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import functools import json import logging import os import re import sys import traceback try: # py3 from http.client import responses except ImportError:...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_1644_0
crossvul-python_data_good_5730_0
""" Form Widget classes specific to the Django admin site. """ from __future__ import unicode_literals import copy from django import forms from django.contrib.admin.templatetags.admin_static import static from django.core.urlresolvers import reverse from django.forms.widgets import RadioFieldRenderer from django.for...
./CrossVul/dataset_final_sorted/CWE-79/py/good_5730_0
crossvul-python_data_bad_3890_3
import hashlib import json import os import uuid from django import forms from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.paginator import Emp...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_3890_3
crossvul-python_data_bad_1727_0
# coding: utf-8 """A tornado based IPython notebook server.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import base64 import datetime import errno import importlib import io import json import logging import os import r...
./CrossVul/dataset_final_sorted/CWE-79/py/bad_1727_0