id stringlengths 28 33 | content stringlengths 14 265k ⌀ | max_stars_repo_path stringlengths 49 55 |
|---|---|---|
crossvul-python_data_bad_1915_3 | # -*- coding: utf-8 -*-
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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 require... | ./CrossVul/dataset_final_sorted/CWE-601/py/bad_1915_3 |
crossvul-python_data_bad_3250_3 | # Copyright 2014 Netflix, 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... | ./CrossVul/dataset_final_sorted/CWE-601/py/bad_3250_3 |
crossvul-python_data_good_1669_0 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_1669_0 |
crossvul-python_data_bad_1669_1 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_1669_1 |
crossvul-python_data_bad_4414_0 | '''
Created on Jul 6, 2018
@author: kumykov
Wrapper for common HUB API queries.
Upon initialization Bearer tocken is obtained and used for all subsequent calls
Usage:
credentials and hub URL could be placed in the .restconfig.json file
{
"baseurl": "https://hub-hostname",
"username": "<userna... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_4414_0 |
crossvul-python_data_bad_1669_5 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_1669_5 |
crossvul-python_data_bad_1669_0 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_1669_0 |
crossvul-python_data_good_4414_1 | VERSION = (0, 0, 53)
__version__ = '.'.join(map(str, VERSION))
| ./CrossVul/dataset_final_sorted/CWE-295/py/good_4414_1 |
crossvul-python_data_good_4414_0 | '''
Created on Jul 6, 2018
@author: kumykov
Wrapper for common HUB API queries.
Upon initialization Bearer tocken is obtained and used for all subsequent calls
Usage:
credentials and hub URL could be placed in the .restconfig.json file
{
"baseurl": "https://hub-hostname",
"username": "<userna... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_4414_0 |
crossvul-python_data_bad_4414_1 | VERSION = (0, 0, 52)
__version__ = '.'.join(map(str, VERSION))
| ./CrossVul/dataset_final_sorted/CWE-295/py/bad_4414_1 |
crossvul-python_data_bad_1669_3 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_1669_3 |
crossvul-python_data_good_1669_2 | from types import NoneType
import base64
import locale
import logging
import os
import urllib
try:
import oauth2 as oauth
except ImportError:
# python-oauth2 isn't available on RHEL 5.
oauth = None
from M2Crypto import httpslib, m2, SSL
from pulp.bindings import exceptions
from pulp.bindings.responses imp... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_1669_2 |
crossvul-python_data_bad_1669_2 | from types import NoneType
import base64
import locale
import logging
import os
import urllib
try:
import oauth2 as oauth
except ImportError:
# python-oauth2 isn't available on RHEL 5.
oauth = None
from M2Crypto import httpslib, m2, SSL
from pulp.bindings import exceptions
from pulp.bindings.responses imp... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_1669_2 |
crossvul-python_data_bad_4224_0 | # Authors:
# Endi S. Dewata <edewata@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License or
# (at your option) any later version.
#
# This pr... | ./CrossVul/dataset_final_sorted/CWE-295/py/bad_4224_0 |
crossvul-python_data_good_4224_0 | # Authors:
# Endi S. Dewata <edewata@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License or
# (at your option) any later version.
#
# This pr... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_4224_0 |
crossvul-python_data_good_1669_1 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_1669_1 |
crossvul-python_data_good_1669_3 | from pulp.bindings.base import PulpAPI
class StaticRequest(PulpAPI):
"""
Connection class to access static calls
"""
def get_server_key(self):
"""
Retrieve the server's public key.
:return: rsa public key
:rtype: str
"""
return self.server.GET('/pulp/... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_1669_3 |
crossvul-python_data_good_1669_5 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or impli... | ./CrossVul/dataset_final_sorted/CWE-295/py/good_1669_5 |
crossvul-python_data_bad_654_1 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
import cPickle
import hashlib
import random
import shutil
import sys
import zipfile
from json import load as load_j... | ./CrossVul/dataset_final_sorted/CWE-502/py/bad_654_1 |
crossvul-python_data_good_4129_0 | import functools
import random
import re
from typing import Union
import aiohttp
import discord
import inflection
from redbot.core import bot, Config, checks, commands
from redbot.core.i18n import get_locale
from redbot.core.utils.chat_formatting import italics
from .helpers import *
fmt_re = re.compile(r"{(?:0|user... | ./CrossVul/dataset_final_sorted/CWE-502/py/good_4129_0 |
crossvul-python_data_bad_1992_0 | import logging.handlers
import yaml
import importlib
import threading
try:
from queue import Queue
except ImportError:
from Queue import Queue
from pystemon.sendmail import PystemonSendmail
from pystemon.storage import PastieStorage
from pystemon.proxy import ProxyList
from pystemon.pastiesearch import Pastie... | ./CrossVul/dataset_final_sorted/CWE-502/py/bad_1992_0 |
crossvul-python_data_good_1992_0 | import logging.handlers
import yaml
import importlib
import threading
try:
from queue import Queue
except ImportError:
from Queue import Queue
from pystemon.sendmail import PystemonSendmail
from pystemon.storage import PastieStorage
from pystemon.proxy import ProxyList
from pystemon.pastiesearch import Pastie... | ./CrossVul/dataset_final_sorted/CWE-502/py/good_1992_0 |
crossvul-python_data_good_654_1 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2015, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
import cPickle
import hashlib
import random
import shutil
import sys
import zipfile
from json import load as load_j... | ./CrossVul/dataset_final_sorted/CWE-502/py/good_654_1 |
crossvul-python_data_good_654_0 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import json
from PyQt5.Qt import (
Qt, QListWidget, QListWidgetItem, QI... | ./CrossVul/dataset_final_sorted/CWE-502/py/good_654_0 |
crossvul-python_data_bad_4129_0 | import itertools
import random
from typing import Union
import aiohttp
import discord
import inflection
from redbot.core import Config, checks, commands
from redbot.core.i18n import get_locale
from redbot.core.utils.chat_formatting import italics
from .helpers import *
class Act(commands.Cog):
"""
This cog ... | ./CrossVul/dataset_final_sorted/CWE-502/py/bad_4129_0 |
crossvul-python_data_bad_654_0 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
import cPickle
from PyQt5.Qt import (
Qt, QListWidget, QListWidgetItem,... | ./CrossVul/dataset_final_sorted/CWE-502/py/bad_654_0 |
crossvul-python_data_bad_5558_2 | # 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-119/py/bad_5558_2 |
crossvul-python_data_bad_5558_3 | # 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-119/py/bad_5558_3 |
crossvul-python_data_bad_1582_0 | # Authors:
# Trevor Perrin
# Google (adapted by Sam Rushing) - NPN support
# Google - minimal padding
# Martin von Loewis - python 3 port
# Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2
#
# See the LICENSE file for legal information regarding use of this file.
"""Helper class for TLSConnection."""
f... | ./CrossVul/dataset_final_sorted/CWE-119/py/bad_1582_0 |
crossvul-python_data_bad_5559_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-119/py/bad_5559_0 |
crossvul-python_data_bad_5871_0 | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/common.py: Common code for Crypto.SelfTest.Hash
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedicat... | ./CrossVul/dataset_final_sorted/CWE-119/py/bad_5871_0 |
crossvul-python_data_bad_5559_1 | # 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-119/py/bad_5559_1 |
crossvul-python_data_bad_4743_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-119/py/bad_4743_0 |
crossvul-python_data_good_5559_1 | # 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-119/py/good_5559_1 |
crossvul-python_data_bad_5558_4 | # 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-119/py/bad_5558_4 |
crossvul-python_data_good_5558_1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 - 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, ... | ./CrossVul/dataset_final_sorted/CWE-119/py/good_5558_1 |
crossvul-python_data_good_5558_4 | # 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-119/py/good_5558_4 |
crossvul-python_data_bad_5559_2 | # 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-119/py/bad_5559_2 |
crossvul-python_data_good_5559_2 | # 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-119/py/good_5559_2 |
crossvul-python_data_good_5558_3 | # 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-119/py/good_5558_3 |
crossvul-python_data_bad_4745_0 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-119/py/bad_4745_0 |
crossvul-python_data_bad_5558_1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 - 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, ... | ./CrossVul/dataset_final_sorted/CWE-119/py/bad_5558_1 |
crossvul-python_data_good_5559_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-119/py/good_5559_0 |
crossvul-python_data_good_5871_0 | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/common.py: Common code for Crypto.SelfTest.Hash
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedicat... | ./CrossVul/dataset_final_sorted/CWE-119/py/good_5871_0 |
crossvul-python_data_good_4743_0 | from helper import unittest, PillowTestCase
from PIL import Image
TEST_FILE = "Tests/images/libtiff_segfault.tif"
class TestLibtiffSegfault(PillowTestCase):
def test_segfault(self):
""" This test should not segfault. It will on Pillow <= 3.1.0 and
libtiff >= 4.0.0
"""
try:... | ./CrossVul/dataset_final_sorted/CWE-119/py/good_4743_0 |
crossvul-python_data_good_5558_2 | # 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-119/py/good_5558_2 |
crossvul-python_data_good_1582_0 | # Authors:
# Trevor Perrin
# Google (adapted by Sam Rushing) - NPN support
# Google - minimal padding
# Martin von Loewis - python 3 port
# Yngve Pettersen (ported by Paul Sokolovsky) - TLS 1.2
#
# See the LICENSE file for legal information regarding use of this file.
"""Helper class for TLSConnection."""
f... | ./CrossVul/dataset_final_sorted/CWE-119/py/good_1582_0 |
crossvul-python_data_good_4745_0 | from helper import unittest, PillowTestCase
from PIL import Image
TEST_FILE = "Tests/images/fli_overflow.fli"
class TestFliOverflow(PillowTestCase):
def test_fli_overflow(self):
# this should not crash with a malloc error or access violation
im = Image.open(TEST_FILE)
im.load()
... | ./CrossVul/dataset_final_sorted/CWE-119/py/good_4745_0 |
crossvul-python_data_bad_4376_3 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""OpenSSL/M2Crypto RSA implementation."""
from .cryptomath import *
from .rsakey import *
from .python_rsakey import Python_RSAKey
from .compat import compatAscii2Bytes
#copied from M2Crypto.util.py, so when we load th... | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_3 |
crossvul-python_data_good_4376_3 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""OpenSSL/M2Crypto RSA implementation."""
from .cryptomath import *
from .rsakey import *
from .python_rsakey import Python_RSAKey
from .compat import compatAscii2Bytes
import sys
#copied from M2Crypto.util.py, so when... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_3 |
crossvul-python_data_bad_4376_5 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Pure-Python RSA implementation."""
import threading
from .cryptomath import *
from .asn1parser import ASN1Parser
from .rsakey import *
from .pem import *
class Python_RSAKey(RSAKey):
def __init__(self, n=0, e=0, d=... | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_5 |
crossvul-python_data_good_4376_2 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Factory functions for asymmetric cryptography."""
from .compat import *
from .rsakey import RSAKey
from .python_rsakey import Python_RSAKey
from tlslite.utils import cryptomath
if cryptomath.m2cryptoLoaded:
from ... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_2 |
crossvul-python_data_bad_4376_0 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Miscellaneous functions to mask Python version differences."""
import sys
import os
import platform
import math
import binascii
import traceback
import ecdsa
if sys.version_info >= (3,0):
def compat26Str(x): retu... | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_0 |
crossvul-python_data_good_4376_4 |
from .python_rsakey import Python_RSAKey
from .pem import dePem, pemSniff
from .asn1parser import ASN1Parser
from .cryptomath import bytesToNumber
class Python_Key(object):
"""
Generic methods for parsing private keys from files.
Handles both RSA and ECDSA keys, irrespective of file format.
"""
... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_4 |
crossvul-python_data_bad_4376_4 | 404: Not Found | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_4 |
crossvul-python_data_bad_4376_2 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Factory functions for asymmetric cryptography."""
from .compat import *
from .rsakey import RSAKey
from .python_rsakey import Python_RSAKey
from tlslite.utils import cryptomath
if cryptomath.m2cryptoLoaded:
from ... | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_2 |
crossvul-python_data_good_4376_5 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Pure-Python RSA implementation."""
import threading
from .cryptomath import *
from .asn1parser import ASN1Parser
from .rsakey import *
from .pem import *
class Python_RSAKey(RSAKey):
def __init__(self, n=0, e=0, d=... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_5 |
crossvul-python_data_good_4376_0 | # Author: Trevor Perrin
# See the LICENSE file for legal information regarding use of this file.
"""Miscellaneous functions to mask Python version differences."""
import sys
import os
import re
import platform
import math
import binascii
import traceback
import ecdsa
if sys.version_info >= (3,0):
def compat26St... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_0 |
crossvul-python_data_bad_4376_1 | # Copyright (c) 2015, Hubert Kario
#
# See the LICENSE file for legal information regarding use of this file.
"""Various constant time functions for processing sensitive data"""
from __future__ import division
from .compat import compatHMAC
import hmac
def ct_lt_u32(val_a, val_b):
"""
Returns 1 if val_a < va... | ./CrossVul/dataset_final_sorted/CWE-326/py/bad_4376_1 |
crossvul-python_data_good_4376_1 | # Copyright (c) 2015, Hubert Kario
#
# See the LICENSE file for legal information regarding use of this file.
"""Various constant time functions for processing sensitive data"""
from __future__ import division
from .compat import compatHMAC
import hmac
def ct_lt_u32(val_a, val_b):
"""
Returns 1 if val_a < va... | ./CrossVul/dataset_final_sorted/CWE-326/py/good_4376_1 |
crossvul-python_data_bad_3918_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-684/py/bad_3918_2 |
crossvul-python_data_good_3918_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-684/py/good_3918_1 |
crossvul-python_data_good_3922_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3922_0 |
crossvul-python_data_bad_3921_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-684/py/bad_3921_2 |
crossvul-python_data_good_3914_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3914_1 |
crossvul-python_data_bad_3921_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-684/py/bad_3921_0 |
crossvul-python_data_good_3923_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3923_2 |
crossvul-python_data_good_3923_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3923_1 |
crossvul-python_data_bad_3914_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3914_2 |
crossvul-python_data_good_3915_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3915_1 |
crossvul-python_data_bad_3922_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3922_1 |
crossvul-python_data_good_3918_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-684/py/good_3918_2 |
crossvul-python_data_good_3920_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3920_2 |
crossvul-python_data_bad_3922_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3922_0 |
crossvul-python_data_good_3915_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3915_2 |
crossvul-python_data_bad_3917_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3917_2 |
crossvul-python_data_good_3914_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3914_2 |
crossvul-python_data_good_3917_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3917_1 |
crossvul-python_data_good_3922_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3922_1 |
crossvul-python_data_bad_3915_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3915_2 |
crossvul-python_data_bad_3919_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3919_0 |
crossvul-python_data_bad_3917_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3917_1 |
crossvul-python_data_bad_3918_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-684/py/bad_3918_0 |
crossvul-python_data_bad_3914_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3914_0 |
crossvul-python_data_bad_3919_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3919_1 |
crossvul-python_data_good_3919_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3919_2 |
crossvul-python_data_bad_3920_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3920_2 |
crossvul-python_data_bad_3915_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3915_1 |
crossvul-python_data_good_3919_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/good_3919_1 |
crossvul-python_data_good_3923_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3923_0 |
crossvul-python_data_bad_3921_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-684/py/bad_3921_1 |
crossvul-python_data_bad_3917_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3917_0 |
crossvul-python_data_good_3917_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/good_3917_2 |
crossvul-python_data_bad_3919_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3919_2 |
crossvul-python_data_bad_3923_2 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3923_2 |
crossvul-python_data_bad_3923_1 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3923_1 |
crossvul-python_data_bad_3915_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2019 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-684/py/bad_3915_0 |
crossvul-python_data_good_3921_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-684/py/good_3921_1 |
crossvul-python_data_bad_3920_0 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2020 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-684/py/bad_3920_0 |
crossvul-python_data_good_3918_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-684/py/good_3918_0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.