commit_msg
string
commit_url
string
cve_id
null
cwe_id
null
file_name
string
vulnerability_score
int64
extension
string
date
string
id
string
func
string
vulnerable
int64
language
string
Merge pull request from GHSA-p6p2-qq95-vq5h * Removing custom connector template functions * Updating connector template modal description * Adding function upload tests
https://github.com/ethyca/fides/commit/5989b5fa744c8d8c340963b895a054883549358a
null
null
src/fides/api/service/connectors/saas/connector_registry_service.py
3
py
2023-09-05T19:51:11Z
cleanvul_py_t3_00000_before
def save_template(cls, db: Session, zip_file: ZipFile) -> None: """ Extracts and validates the contents of a zip file containing a custom connector template, registers the template, and saves it to the database. """ # verify the zip file before we use it verify_zip(zip_f...
1
py
Merge pull request from GHSA-p6p2-qq95-vq5h * Removing custom connector template functions * Updating connector template modal description * Adding function upload tests
https://github.com/ethyca/fides/commit/5989b5fa744c8d8c340963b895a054883549358a
null
null
src/fides/api/service/connectors/saas/connector_registry_service.py
3
py
2023-09-05T19:51:11Z
cleanvul_py_t3_00000_after
def save_template(cls, db: Session, zip_file: ZipFile) -> None: """ Extracts and validates the contents of a zip file containing a custom connector template, registers the template, and saves it to the database. """ # verify the zip file before we use it verify_zip(zip_f...
0
py
[2.0] Fix unsafe `mark_safe` use in various features (#4832) * Audit all uses of mark_safe() and change to format_html() where appropriate * Test updates and change fragment * Add ruff for linting, add S308 disables to audited code * Test fixes * Update change fragments * One more change fragment ---------
https://github.com/nautobot/nautobot/commit/54abe23331b6c3d0d82bf1b028c679b1d200920d
null
null
nautobot/core/views/utils.py
3
py
2023-11-21T21:16:21Z
cleanvul_py_t3_00001_before
def get_csv_form_fields_from_serializer_class(serializer_class): """From the given serializer class, build a list of field dicts suitable for rendering in the CSV import form.""" serializer = serializer_class(context={"request": None, "depth": 0}) fields = [] for field_name, field in serializer.fields.i...
1
py
[2.0] Fix unsafe `mark_safe` use in various features (#4832) * Audit all uses of mark_safe() and change to format_html() where appropriate * Test updates and change fragment * Add ruff for linting, add S308 disables to audited code * Test fixes * Update change fragments * One more change fragment ---------
https://github.com/nautobot/nautobot/commit/54abe23331b6c3d0d82bf1b028c679b1d200920d
null
null
nautobot/core/views/utils.py
3
py
2023-11-21T21:16:21Z
cleanvul_py_t3_00001_after
def get_csv_form_fields_from_serializer_class(serializer_class): """From the given serializer class, build a list of field dicts suitable for rendering in the CSV import form.""" serializer = serializer_class(context={"request": None, "depth": 0}) fields = [] for field_name, field in serializer.fields.i...
0
py
Fix a security related issue where an authenticated user can run remote command using validate binary path API. #6763 CVE-XXXX-XXXXX - request raised, number to be received.
https://github.com/pgadmin-org/pgadmin4/commit/01dc3e8bed088bbc0724376bf0fc725a095cf1a3
null
null
web/pgadmin/misc/file_manager/__init__.py
3
py
2023-09-18T07:38:38Z
cleanvul_py_t3_00004_before
def check_file_for_bom_and_binary(filename, enc="utf-8"): """ This utility function will check if file is Binary file and/or if it startswith BOM character Args: filename: File enc: Encoding for the file Returns: Status(Error?), Error message...
1
py
Fix a security related issue where an authenticated user can run remote command using validate binary path API. #6763 CVE-XXXX-XXXXX - request raised, number to be received.
https://github.com/pgadmin-org/pgadmin4/commit/01dc3e8bed088bbc0724376bf0fc725a095cf1a3
null
null
web/pgadmin/misc/file_manager/__init__.py
3
py
2023-09-18T07:38:38Z
cleanvul_py_t3_00004_after
def check_file_for_bom_and_binary(filename, enc="utf-8"): """ This utility function will check if file is Binary file and/or if it startswith BOM character Args: filename: File enc: Encoding for the file Returns: Status(Error?), Error message...
0
py
Use re2 for matching untrusted regex
https://github.com/apache/airflow/commit/dc23225b5fb2872102f68e3ff32dcc09ae5d37aa
null
null
airflow/models/dag.py
3
py
null
cleanvul_py_t3_00005_before
def partial_subset( self, task_ids_or_regex: str | re.Pattern | Iterable[str], include_downstream=False, include_upstream=True, include_direct_upstream=False, ): """ Returns a subset of the current dag as a deep copy of the current dag based on a regex...
1
py
Use re2 for matching untrusted regex
https://github.com/apache/airflow/commit/dc23225b5fb2872102f68e3ff32dcc09ae5d37aa
null
null
airflow/models/dag.py
3
py
null
cleanvul_py_t3_00005_after
def partial_subset( self, task_ids_or_regex: str | Pattern | Iterable[str], include_downstream=False, include_upstream=True, include_direct_upstream=False, ): """ Returns a subset of the current dag as a deep copy of the current dag based on a regex th...
0
py
refactor: optimize calldatasize check (#3104) this changes the calldatasize check from a global/contract-entry check to a function-local check - the calldatasize check only needs to be present if a selector is 0. this maintains the invariant protecting against the bug in #1603 while being more efficient. Co-authored-...
https://github.com/vyperlang/vyper/commit/02339dfda0f3caabad142060d511d10bfe93c520
null
null
vyper/codegen/module.py
3
py
2023-01-20T16:06:25Z
cleanvul_py_t3_00006_before
def _runtime_ir(runtime_functions, all_sigs, global_ctx): # categorize the runtime functions because we will organize the runtime # code into the following sections: # payable functions, nonpayable functions, fallback function, internal_functions internal_functions = [f for f in runtime_functions if _is...
1
py
refactor: optimize calldatasize check (#3104) this changes the calldatasize check from a global/contract-entry check to a function-local check - the calldatasize check only needs to be present if a selector is 0. this maintains the invariant protecting against the bug in #1603 while being more efficient. Co-authored-...
https://github.com/vyperlang/vyper/commit/02339dfda0f3caabad142060d511d10bfe93c520
null
null
vyper/codegen/module.py
3
py
2023-01-20T16:06:25Z
cleanvul_py_t3_00006_after
def _runtime_ir(runtime_functions, all_sigs, global_ctx): # categorize the runtime functions because we will organize the runtime # code into the following sections: # payable functions, nonpayable functions, fallback function, internal_functions internal_functions = [f for f in runtime_functions if _is...
0
py
Updates to collaboration scope - implemented a few more endpoints and modified base functions to check permissions
https://github.com/vantage6/vantage6/commit/28c303675028513bc2f87be75be85e35bcb296e9
null
null
vantage6-server/vantage6/server/resource/user.py
3
py
2023-06-08T14:25:23Z
cleanvul_py_t3_00007_before
def post(self): """Create user --- description: >- Creates new user from the request data to the users organization.\n ### Permission Table\n |Rule name|Scope|Operation|Assigned to node|Assigned to container| Description|\n |--|--|--|--|--|--|\n...
1
py
Updates to collaboration scope - implemented a few more endpoints and modified base functions to check permissions
https://github.com/vantage6/vantage6/commit/28c303675028513bc2f87be75be85e35bcb296e9
null
null
vantage6-server/vantage6/server/resource/user.py
3
py
2023-06-08T14:25:23Z
cleanvul_py_t3_00007_after
def post(self): """Create user --- description: >- Creates new user from the request data to the users organization.\n ### Permission Table\n |Rule name|Scope|Operation|Assigned to node|Assigned to container| Description|\n |--|--|--|--|--|--|\n...
0
py
Added consume all to streams.
https://github.com/Cog-Creators/Red-DiscordBot/commit/e269ea0d3bc88417163c18431b1df38a9be92bfc
null
null
redbot/cogs/streams/streams.py
3
py
2020-08-11T22:40:06Z
cleanvul_py_t3_00008_before
async def check_streams(self): for stream in self.streams: with contextlib.suppress(Exception): try: if stream.__class__.__name__ == "TwitchStream": await self.maybe_renew_twitch_bearer_token() embed, is_rerun = awai...
1
py
Added consume all to streams.
https://github.com/Cog-Creators/Red-DiscordBot/commit/e269ea0d3bc88417163c18431b1df38a9be92bfc
null
null
redbot/cogs/streams/streams.py
3
py
2020-08-11T22:40:06Z
cleanvul_py_t3_00008_after
async def check_streams(self): for stream in self.streams: with contextlib.suppress(Exception): try: if stream.__class__.__name__ == "TwitchStream": await self.maybe_renew_twitch_bearer_token() embed, is_rerun = awai...
0
py
Merge branch 'main' into fix/triggerer_log
https://github.com/apache/airflow/commit/ddedb1df6603e4c9974d6a2da527a28046b8cc10
null
null
airflow/dag_processing/manager.py
3
py
2023-04-01T21:36:22Z
cleanvul_py_t3_00009_before
def _add_callback_to_queue(self, request: CallbackRequest): # requests are sent by dag processors. SLAs exist per-dag, but can be generated once per SLA-enabled # task in the dag. If treated like other callbacks, SLAs can cause feedback where a SLA arrives, # goes to the front of the queue, gets...
1
py
Merge branch 'main' into fix/triggerer_log
https://github.com/apache/airflow/commit/ddedb1df6603e4c9974d6a2da527a28046b8cc10
null
null
airflow/dag_processing/manager.py
3
py
2023-04-01T21:36:22Z
cleanvul_py_t3_00009_after
def _add_callback_to_queue(self, request: CallbackRequest): # requests are sent by dag processors. SLAs exist per-dag, but can be generated once per SLA-enabled # task in the dag. If treated like other callbacks, SLAs can cause feedback where a SLA arrives, # goes to the front of the queue, gets...
0
py
refactor: optimize calldatasize check (#3104) this changes the calldatasize check from a global/contract-entry check to a function-local check - the calldatasize check only needs to be present if a selector is 0. this maintains the invariant protecting against the bug in #1603 while being more efficient. Co-authored-...
https://github.com/vyperlang/vyper/commit/02339dfda0f3caabad142060d511d10bfe93c520
null
null
vyper/codegen/function_definitions/external_function.py
3
py
2023-01-20T16:06:25Z
cleanvul_py_t3_00011_before
def _generate_kwarg_handlers(context: Context, sig: FunctionSignature) -> List[Any]: # generate kwarg handlers. # since they might come in thru calldata or be default, # allocate them in memory and then fill it in based on calldata or default, # depending on the signature # a kwarg handler looks lik...
1
py
refactor: optimize calldatasize check (#3104) this changes the calldatasize check from a global/contract-entry check to a function-local check - the calldatasize check only needs to be present if a selector is 0. this maintains the invariant protecting against the bug in #1603 while being more efficient. Co-authored-...
https://github.com/vyperlang/vyper/commit/02339dfda0f3caabad142060d511d10bfe93c520
null
null
vyper/codegen/function_definitions/external_function.py
3
py
2023-01-20T16:06:25Z
cleanvul_py_t3_00011_after
def _generate_kwarg_handlers(context: Context, sig: FunctionSignature) -> List[Any]: # generate kwarg handlers. # since they might come in thru calldata or be default, # allocate them in memory and then fill it in based on calldata or default, # depending on the signature # a kwarg handler looks lik...
0
py
Updated web data uploads to be turned off by default
https://github.com/man-group/dtale/commit/954f6be1a06ff8629ead2c85c6e3f8e2196b3df2
null
null
dtale/views.py
3
py
2024-01-03T15:44:17Z
cleanvul_py_t3_00013_before
def startup( url="", data=None, data_loader=None, name=None, data_id=None, context_vars=None, ignore_duplicate=True, allow_cell_edits=True, inplace=False, drop_index=False, precision=2, show_columns=None, hide_columns=None, optimize_dataframe=False, column_for...
1
py
Updated web data uploads to be turned off by default
https://github.com/man-group/dtale/commit/954f6be1a06ff8629ead2c85c6e3f8e2196b3df2
null
null
dtale/views.py
3
py
2024-01-03T15:44:17Z
cleanvul_py_t3_00013_after
def startup( url="", data=None, data_loader=None, name=None, data_id=None, context_vars=None, ignore_duplicate=True, allow_cell_edits=True, inplace=False, drop_index=False, precision=2, show_columns=None, hide_columns=None, optimize_dataframe=False, column_for...
0
py
Add is_valid_pipeline_relative_path check
https://github.com/orchest/orchest/commit/4c35c20110da8046a4df0fa31d384c75f3c1af2d
null
null
services/orchest-webserver/app/app/core/pipelines.py
3
py
2022-05-02T08:54:53Z
cleanvul_py_t3_00014_before
def _collateral( self, project_uuid: str, pipeline_uuid: str, pipeline_name: str, pipeline_path: str, **kwargs, ): pipeline_dir = get_pipeline_directory(pipeline_uuid, project_uuid) pipeline_json_path = get_pipeline_path(pipeline_uuid, project_uuid) ...
1
py
Add is_valid_pipeline_relative_path check
https://github.com/orchest/orchest/commit/4c35c20110da8046a4df0fa31d384c75f3c1af2d
null
null
services/orchest-webserver/app/app/core/pipelines.py
3
py
2022-05-02T08:54:53Z
cleanvul_py_t3_00014_after
def _collateral( self, project_uuid: str, pipeline_uuid: str, old_path: str, new_path: str, ): """Move a pipeline to another path, i.e. rename it.""" if not is_valid_project_relative_path(project_uuid, new_path): raise error.OutOfProjectError( ...
0
py
Use `-r=...` instead of `-r ...` for hg This ensures that the resulting revision can not be misinterpreted as an option.
https://github.com/pypa/pip/commit/389cb799d0da9a840749fcd14878928467ed49b4
null
null
src/pip/_internal/vcs/mercurial.py
3
py
2023-10-01T13:10:25Z
cleanvul_py_t3_00015_before
def get_base_rev_args(rev: str) -> List[str]: return ["-r", rev]
1
py
Use `-r=...` instead of `-r ...` for hg This ensures that the resulting revision can not be misinterpreted as an option.
https://github.com/pypa/pip/commit/389cb799d0da9a840749fcd14878928467ed49b4
null
null
src/pip/_internal/vcs/mercurial.py
3
py
2023-10-01T13:10:25Z
cleanvul_py_t3_00015_after
def get_base_rev_args(rev: str) -> List[str]: return [f"-r={rev}"]
0
py
Enabled TLS certificate verification in get_vault_token()
https://github.com/allegro/bigflow/commit/7e956661f76907594e8c82e8fb0af76dbea2a0fc
null
null
bigflow/deploy.py
3
py
2023-01-30T11:23:56Z
cleanvul_py_t3_00016_before
def deploy_docker_image( image_tar_path: str, docker_repository: str, auth_method: AuthorizationType = AuthorizationType.LOCAL_ACCOUNT, vault_endpoint: T.Optional[str] = None, vault_secret: T.Optional[str] = None, ) -> str: if image_tar_path.endswith(".toml"): deploy_fn = _deploy_docker_...
1
py
Enabled TLS certificate verification in get_vault_token()
https://github.com/allegro/bigflow/commit/7e956661f76907594e8c82e8fb0af76dbea2a0fc
null
null
bigflow/deploy.py
3
py
2023-01-30T11:23:56Z
cleanvul_py_t3_00016_after
def deploy_docker_image( image_tar_path: str, docker_repository: str, auth_method: AuthorizationType = AuthorizationType.LOCAL_ACCOUNT, vault_endpoint: T.Optional[str] = None, vault_endpoint_verify: str | bool | None = None, vault_secret: T.Optional[str] = None, ) -> str: if image_tar_path.e...
0
py
Don't safe_join os.pardir
https://github.com/orchest/orchest/commit/00eb502a42aa86571d6a6dec285d3065e73b01ef
null
null
services/orchest-webserver/app/app/core/filemanager.py
3
py
2022-05-02T09:30:01Z
cleanvul_py_t3_00017_before
def find_unique_duplicate_filepath(fp): counter = 1 new_path_fs = "{base} ({counter}){ext}" if fp.endswith("/"): basename = os.path.basename(fp[:-1]) ext = "" base_no_ext = basename else: basename = os.path.basename(fp) _, ext = os.path.splitext(fp) if le...
1
py
Don't safe_join os.pardir
https://github.com/orchest/orchest/commit/00eb502a42aa86571d6a6dec285d3065e73b01ef
null
null
services/orchest-webserver/app/app/core/filemanager.py
3
py
2022-05-02T09:30:01Z
cleanvul_py_t3_00017_after
def find_unique_duplicate_filepath(fp): counter = 1 new_path_fs = "{base} ({counter}){ext}" if fp.endswith("/"): basename = os.path.basename(fp[:-1]) ext = "" base_no_ext = basename else: basename = os.path.basename(fp) _, ext = os.path.splitext(fp) if le...
0
py
Don't allow update_into to mutate immutable objects
https://github.com/pyca/cryptography/commit/94a50a9731f35405f0357fa5f3b177d46a726ab3
null
null
src/cryptography/hazmat/backends/openssl/ciphers.py
3
py
2023-01-31T13:33:54Z
cleanvul_py_t3_00018_before
def update_into(self, data: bytes, buf: bytes) -> int: total_data_len = len(data) if len(buf) < (total_data_len + self._block_size_bytes - 1): raise ValueError( "buffer must be at least {} bytes for this " "payload".format(len(data) + self._block_size_bytes - ...
1
py
Don't allow update_into to mutate immutable objects
https://github.com/pyca/cryptography/commit/94a50a9731f35405f0357fa5f3b177d46a726ab3
null
null
src/cryptography/hazmat/backends/openssl/ciphers.py
3
py
2023-01-31T13:33:54Z
cleanvul_py_t3_00018_after
def update_into(self, data: bytes, buf: bytes) -> int: total_data_len = len(data) if len(buf) < (total_data_len + self._block_size_bytes - 1): raise ValueError( "buffer must be at least {} bytes for this " "payload".format(len(data) + self._block_size_bytes - ...
0
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00019_before
def testPMS(self, host=None, username=None, password=None, plex_server_token=None): self.set_header(b'Cache-Control', 'max-age=0,no-cache,no-store') if set('*') == set(password or '*'): password = sickbeard.PLEX_SERVER_PASSWORD finalResult = '' curResult = notifiers.plex_n...
1
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00019_after
def testPMS(self, host=None, username=None, password=None, plex_server_token=None): self.set_header(b'Cache-Control', 'max-age=0,no-cache,no-store') password = filters.unhide(sickbeard.PLEX_SERVER_PASSWORD, password) finalResult = '' curResult = notifiers.plex_notifier.test_notify_pms...
0
py
Merge pull request from GHSA-mq5p-2mcr-m52j make positional args explicit
https://github.com/jupyterhub/nbgitpuller/commit/07690644f29a566011dd0d7ba14cae3eb0490481
null
null
nbgitpuller/pull.py
3
py
2021-08-25T12:23:02Z
cleanvul_py_t3_00020_before
def resolve_default_branch(self): """ This will resolve the default branch of the repo in the case where the branch given does not exist """ try: head_branch = subprocess.run( ["git", "ls-remote", "--symref", self.git_url, "HEAD"], capt...
1
py
Merge pull request from GHSA-mq5p-2mcr-m52j make positional args explicit
https://github.com/jupyterhub/nbgitpuller/commit/07690644f29a566011dd0d7ba14cae3eb0490481
null
null
nbgitpuller/pull.py
3
py
2021-08-25T12:23:02Z
cleanvul_py_t3_00020_after
def resolve_default_branch(self): """ This will resolve the default branch of the repo in the case where the branch given does not exist """ try: head_branch = subprocess.run( ["git", "ls-remote", "--symref", "--", self.git_url, "HEAD"], ...
0
py
tpm: do not compress quote with zlib by default Pythons zlib decompression has no mitigations against zip bombs or similar attacks, so we remove the compression for the quote data. The data itself is rather small compared to the IMA or UEFI event log. Signed-off-by: Thore Sommer <mail@thson.de>
https://github.com/keylime/keylime/commit/6e44758b64b0ee13564fc46e807f4ba98091c355
null
null
keylime/cloud_verifier_common.py
3
py
2022-01-16T15:14:07Z
cleanvul_py_t3_00021_before
def process_quote_response(agent, json_response, agentAttestState) -> Failure: """Validates the response from the Cloud agent. This method invokes an Registrar Server call to register, and then check the quote. """ failure = Failure(Component.QUOTE_VALIDATION) received_public_key = None quote =...
1
py
tpm: do not compress quote with zlib by default Pythons zlib decompression has no mitigations against zip bombs or similar attacks, so we remove the compression for the quote data. The data itself is rather small compared to the IMA or UEFI event log. Signed-off-by: Thore Sommer <mail@thson.de>
https://github.com/keylime/keylime/commit/6e44758b64b0ee13564fc46e807f4ba98091c355
null
null
keylime/cloud_verifier_common.py
3
py
2022-01-16T15:14:07Z
cleanvul_py_t3_00021_after
def process_quote_response(agent, json_response, agentAttestState) -> Failure: """Validates the response from the Cloud agent. This method invokes an Registrar Server call to register, and then check the quote. """ failure = Failure(Component.QUOTE_VALIDATION) received_public_key = None quote =...
0
py
Merge pull request from GHSA-7wgr-7666-7pwj * All strings used as file/directory names are now sanitized to address the path traversal vulnerabilities * Switched calls to utils.spinal_case to utils.kebab_case Co-authored-by: Ethan Mann <emann@triaxtec.com>
https://github.com/triaxtec/openapi-python-client/commit/3e7dfae5d0b3685abf1ede1bc6c086a116ac4746
null
null
openapi_python_client/__init__.py
3
py
2020-08-13T16:57:06Z
cleanvul_py_t3_00022_before
def _build_api(self) -> None: # Generate Client client_path = self.package_dir / "client.py" client_template = self.env.get_template("client.pyi") client_path.write_text(client_template.render()) # Generate endpoints api_dir = self.package_dir / "api" api_dir.mkd...
1
py
Merge pull request from GHSA-7wgr-7666-7pwj * All strings used as file/directory names are now sanitized to address the path traversal vulnerabilities * Switched calls to utils.spinal_case to utils.kebab_case Co-authored-by: Ethan Mann <emann@triaxtec.com>
https://github.com/triaxtec/openapi-python-client/commit/3e7dfae5d0b3685abf1ede1bc6c086a116ac4746
null
null
openapi_python_client/__init__.py
3
py
2020-08-13T16:57:06Z
cleanvul_py_t3_00022_after
def _build_api(self) -> None: # Generate Client client_path = self.package_dir / "client.py" client_template = self.env.get_template("client.pyi") client_path.write_text(client_template.render()) # Generate endpoints api_dir = self.package_dir / "api" api_dir.mkd...
0
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00024_before
def testEMBY(host=None, emby_apikey=None): host = config.clean_host(host) result = notifiers.emby_notifier.test_notify(unquote_plus(host), emby_apikey) if result: return _("Test notice sent successfully to {emby_host}").format(emby_host=unquote_plus(host)) else: ...
1
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00024_after
def testEMBY(host=None, emby_apikey=None): host = config.clean_host(host) emby_apikey = filters.unhide(sickbeard.EMBY_APIKEY, emby_apikey) result = notifiers.emby_notifier.test_notify(unquote_plus(host), emby_apikey) if result: return _("Test notice sent successfully to {emby...
0
py
Security: Fix for LFI found by thongngo
https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/b9cdd1f52bdf127cf33bb1be369e374a2855f8e6
null
null
DynamicAnalyzer/views.py
3
py
2016-05-26T13:47:30Z
cleanvul_py_t3_00026_before
def TakeScreenShot(request): print "\n[INFO] Taking Screenshot" try: if request.method == 'POST': MD5=request.POST['md5'] m=re.match('[0-9a-f]{32}',MD5) if m: data = {} r=random.randint(1, 1000000) DIR=settings.BASE_DIR ...
1
py
Security: Fix for LFI found by thongngo
https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/b9cdd1f52bdf127cf33bb1be369e374a2855f8e6
null
null
DynamicAnalyzer/views.py
3
py
2016-05-26T13:47:30Z
cleanvul_py_t3_00026_after
def TakeScreenShot(request): print "\n[INFO] Taking Screenshot" try: if request.method == 'POST': MD5=request.POST['md5'] m=re.match('^[0-9a-f]{32}$',MD5) if m: data = {} r=random.randint(1, 1000000) DIR=settings.BASE_DI...
0
py
Merge branch 'main' into fix/triggerer_log
https://github.com/apache/airflow/commit/ddedb1df6603e4c9974d6a2da527a28046b8cc10
null
null
airflow/serialization/serde.py
3
py
2023-04-01T21:36:22Z
cleanvul_py_t3_00027_before
def deserialize(o: T | None, full=True, type_hint: Any = None) -> object: """ Deserializes an object of primitive type T into an object. Uses an allow list to determine if a class can be loaded. :param o: primitive to deserialize into an arbitrary object. :param full: if False it will return a stri...
1
py
Merge branch 'main' into fix/triggerer_log
https://github.com/apache/airflow/commit/ddedb1df6603e4c9974d6a2da527a28046b8cc10
null
null
airflow/serialization/serde.py
3
py
2023-04-01T21:36:22Z
cleanvul_py_t3_00027_after
def deserialize(o: T | None, full=True, type_hint: Any = None) -> object: """ Deserializes an object of primitive type T into an object. Uses an allow list to determine if a class can be loaded. :param o: primitive to deserialize into an arbitrary object. :param full: if False it will return a stri...
0
py
When parsing json from untrusted sources, remove templating tags
https://github.com/ansible/ansible/commit/8ed6350e65c82292a631f08845dfaacffe7f07f5
null
null
lib/ansible/runner/__init__.py
3
py
2014-06-30T20:59:32Z
cleanvul_py_t3_00028_before
def _execute_module(self, conn, tmp, module_name, args, async_jid=None, async_module=None, async_limit=None, inject=None, persist_files=False, complex_args=None, delete_remote_tmp=True): ''' transfer and run a module along with its arguments on the remote side''' # hack to support fireball mod...
1
py
When parsing json from untrusted sources, remove templating tags
https://github.com/ansible/ansible/commit/8ed6350e65c82292a631f08845dfaacffe7f07f5
null
null
lib/ansible/runner/__init__.py
3
py
2014-06-30T20:59:32Z
cleanvul_py_t3_00028_after
def _execute_module(self, conn, tmp, module_name, args, async_jid=None, async_module=None, async_limit=None, inject=None, persist_files=False, complex_args=None, delete_remote_tmp=True): ''' transfer and run a module along with its arguments on the remote side''' # hack to support fireball mod...
0
py
Fix improper use of socket authentication in mysql.user_chpass
https://github.com/saltstack/salt/commit/f47dda61e651ea1e38fbc0bf6ab5272380b1491e
null
null
salt/modules/mysql.py
3
py
2019-02-01T13:52:52Z
cleanvul_py_t3_00029_before
def user_chpass(user, host='localhost', password=None, password_hash=None, allow_passwordless=False, unix_socket=None, password_column=None, **connection_args): ''' Change password for a MySQL user ...
1
py
Fix improper use of socket authentication in mysql.user_chpass
https://github.com/saltstack/salt/commit/f47dda61e651ea1e38fbc0bf6ab5272380b1491e
null
null
salt/modules/mysql.py
3
py
2019-02-01T13:52:52Z
cleanvul_py_t3_00029_after
def user_chpass(user, host='localhost', password=None, password_hash=None, allow_passwordless=False, unix_socket=None, password_column=None, **connection_args): ''' Change password for a MySQL user ...
0
py
Security: Fix for LFI found by thongngo
https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/b9cdd1f52bdf127cf33bb1be369e374a2855f8e6
null
null
StaticAnalyzer/views.py
3
py
2016-05-26T13:47:30Z
cleanvul_py_t3_00032_before
def StaticAnalyzer_iOS(request): try: #Input validation print "[INFO] iOS Static Analysis Started" TYP=request.GET['type'] RESCAN= str(request.GET.get('rescan', 0)) m=re.match('[0-9a-f]{32}',request.GET['checksum']) if ((m) and (request.GET['name'].lower().endswith('....
1
py
Security: Fix for LFI found by thongngo
https://github.com/MobSF/Mobile-Security-Framework-MobSF/commit/b9cdd1f52bdf127cf33bb1be369e374a2855f8e6
null
null
StaticAnalyzer/views.py
3
py
2016-05-26T13:47:30Z
cleanvul_py_t3_00032_after
def StaticAnalyzer_iOS(request): try: #Input validation print "[INFO] iOS Static Analysis Started" TYP=request.GET['type'] RESCAN= str(request.GET.get('rescan', 0)) m=re.match('^[0-9a-f]{32}$',request.GET['checksum']) if ((m) and (request.GET['name'].lower().endswith(...
0
py
Merge branch 'develop' into squah/fix_rejected_events_in_state
https://github.com/matrix-org/synapse/commit/2431f0ea88949eacedc47b353d4d4bbf2ea05347
null
null
synapse/handlers/e2e_keys.py
3
py
2022-09-14T13:00:22Z
cleanvul_py_t3_00033_before
async def query_devices( self, query_body: JsonDict, timeout: int, from_user_id: str, from_device_id: Optional[str], ) -> JsonDict: """Handle a device key query from a client { "device_keys": { "<user_id>": ["<device_id>"] ...
1
py
Merge branch 'develop' into squah/fix_rejected_events_in_state
https://github.com/matrix-org/synapse/commit/2431f0ea88949eacedc47b353d4d4bbf2ea05347
null
null
synapse/handlers/e2e_keys.py
3
py
2022-09-14T13:00:22Z
cleanvul_py_t3_00033_after
async def query_devices( self, query_body: JsonDict, timeout: int, from_user_id: str, from_device_id: Optional[str], ) -> JsonDict: """Handle a device key query from a client { "device_keys": { "<user_id>": ["<device_id>"] ...
0
py
Remove shell use in subprocess Co-authored-by: Sam Doran <sdoran@redhat.com>
https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd
null
null
ansible_runner/config/doc.py
3
py
2021-10-15T15:22:12Z
cleanvul_py_t3_00034_before
def prepare_plugin_docs_command(self, plugin_names, plugin_type=None, response_format=None, snippet=False, playbook_dir=None, module_path=None): if response_format and response_format not in DocConfig._supported_response_formats: raise ConfigurationError("Invalid...
1
py
Remove shell use in subprocess Co-authored-by: Sam Doran <sdoran@redhat.com>
https://github.com/ansible/ansible-runner/commit/3533f265f4349a3f2a0283158cd01b59a6bbc7bd
null
null
ansible_runner/config/doc.py
3
py
2021-10-15T15:22:12Z
cleanvul_py_t3_00034_after
def prepare_plugin_docs_command(self, plugin_names, plugin_type=None, response_format=None, snippet=False, playbook_dir=None, module_path=None): if response_format and response_format not in DocConfig._supported_response_formats: raise ConfigurationError("Invalid...
0
py
issue #211: escape CVS subdir last-modified file name
https://github.com/viewvc/viewvc/commit/ad0f966e9a997b17d853a6972ea283d4dcd70fa8
null
null
lib/viewvc.py
3
py
2020-03-26T18:11:41Z
cleanvul_py_t3_00035_before
def view_directory(request): cfg = request.cfg # For Subversion repositories, the revision acts as a weak validator for # the directory listing (to take into account template changes or # revision property changes). if request.roottype == 'svn': try: rev = request.repos._getrev(request.pathrev) ...
1
py
issue #211: escape CVS subdir last-modified file name
https://github.com/viewvc/viewvc/commit/ad0f966e9a997b17d853a6972ea283d4dcd70fa8
null
null
lib/viewvc.py
3
py
2020-03-26T18:11:41Z
cleanvul_py_t3_00035_after
def view_directory(request): cfg = request.cfg # For Subversion repositories, the revision acts as a weak validator for # the directory listing (to take into account template changes or # revision property changes). if request.roottype == 'svn': try: rev = request.repos._getrev(request.pathrev) ...
0
py
Validate hostname in more places
https://github.com/matrix-org/sydent/commit/8936925f561b0c352c2fa922d5097d7245aad00a
null
null
sydent/http/servlets/threepidunbindservlet.py
3
py
2021-03-31T15:42:23Z
cleanvul_py_t3_00036_before
def _async_render_POST(self, request): try: try: # json.loads doesn't allow bytes in Python 3.5 body = json.loads(request.content.read().decode("UTF-8")) except ValueError: request.setResponseCode(400) request.write(dict_to_...
1
py
Validate hostname in more places
https://github.com/matrix-org/sydent/commit/8936925f561b0c352c2fa922d5097d7245aad00a
null
null
sydent/http/servlets/threepidunbindservlet.py
3
py
2021-03-31T15:42:23Z
cleanvul_py_t3_00036_after
def _async_render_POST(self, request): try: try: # json.loads doesn't allow bytes in Python 3.5 body = json.loads(request.content.read().decode("UTF-8")) except ValueError: request.setResponseCode(400) request.write(dict_to_...
0
py
Only close socket in the main thread This solves a race condition that may exist when attempting to loop over the open sockets and then calling select() and accidentally have called close() on the socket in an app thread.
https://github.com/Pylons/waitress/commit/c7a3d7ed70e57aa37b1c2efd6b5365ac75cee2ac
null
null
src/waitress/channel.py
3
py
2022-05-25T02:26:47Z
cleanvul_py_t3_00037_before
def _flush_exception(self, flush): if flush: try: return (flush(), False) except OSError: if self.adj.log_socket_errors: self.logger.exception("Socket error") self.will_close = True return (False, True) ...
1
py
Only close socket in the main thread This solves a race condition that may exist when attempting to loop over the open sockets and then calling select() and accidentally have called close() on the socket in an app thread.
https://github.com/Pylons/waitress/commit/c7a3d7ed70e57aa37b1c2efd6b5365ac75cee2ac
null
null
src/waitress/channel.py
3
py
2022-05-25T02:26:47Z
cleanvul_py_t3_00037_after
def _flush_exception(self, flush, do_close=True): if flush: try: return (flush(do_close=do_close), False) except OSError: if self.adj.log_socket_errors: self.logger.exception("Socket error") self.will_close = True ...
0
py
adjust
https://github.com/aio-libs/aiohttp/commit/12a2b51805bc6bff6d2ed6dfafeb071f28e790c4
null
null
aiohttp/web_urldispatcher.py
3
py
2024-01-15T00:53:45Z
cleanvul_py_t3_00038_before
async def _handle(self, request: Request) -> StreamResponse: rel_url = request.match_info["filename"] try: filename = Path(rel_url) if filename.anchor: # rel_url is an absolute name like # /static/\\machine_name\c$ or /static/D:\path ...
1
py
adjust
https://github.com/aio-libs/aiohttp/commit/12a2b51805bc6bff6d2ed6dfafeb071f28e790c4
null
null
aiohttp/web_urldispatcher.py
3
py
2024-01-15T00:53:45Z
cleanvul_py_t3_00038_after
async def _handle(self, request: Request) -> StreamResponse: rel_url = request.match_info["filename"] try: filename = Path(rel_url) if filename.anchor: # rel_url is an absolute name like # /static/\\machine_name\c$ or /static/D:\path ...
0
py
fixed use of hard-coded values for the verify parameter being supplied to the requests module calls
https://github.com/blackducksoftware/hub-rest-api-python/commit/273b27d0de1004389dd8cf43c40b1197c787e7cd
null
null
blackduck/HubRestApi.py
3
py
2020-10-22T18:47:14Z
cleanvul_py_t3_00040_before
def upload_scan(self, filename): url = self.get_apibase() + "/scan/data/?mode=replace" headers = self.get_headers() if filename.endswith('.json') or filename.endswith('.jsonld'): headers['Content-Type'] = 'application/ld+json' with open(filename,"r") as f: ...
1
py
fixed use of hard-coded values for the verify parameter being supplied to the requests module calls
https://github.com/blackducksoftware/hub-rest-api-python/commit/273b27d0de1004389dd8cf43c40b1197c787e7cd
null
null
blackduck/HubRestApi.py
3
py
2020-10-22T18:47:14Z
cleanvul_py_t3_00040_after
def upload_scan(self, filename): url = self.get_apibase() + "/scan/data/?mode=replace" headers = self.get_headers() if filename.endswith('.json') or filename.endswith('.jsonld'): headers['Content-Type'] = 'application/ld+json' with open(filename,"r") as f: ...
0
py
Merge pull request from GHSA-4w59-c3gc-rrhp Introduce maximum length of refresh tokens
https://github.com/vantage6/vantage6/commit/48ebfca42359e9a6743e9598684585e2522cdce8
null
null
vantage6-client/vantage6/client/__init__.py
3
py
2023-02-28T11:04:24Z
cleanvul_py_t3_00041_before
def refresh_token(self) -> None: """Refresh an expired token using the refresh token Raises ------ Exception Authentication Error! """ self.log.info("Refreshing token") assert self.__refresh_url, \ "Refresh URL not found, did you authentic...
1
py
Merge pull request from GHSA-4w59-c3gc-rrhp Introduce maximum length of refresh tokens
https://github.com/vantage6/vantage6/commit/48ebfca42359e9a6743e9598684585e2522cdce8
null
null
vantage6-client/vantage6/client/__init__.py
3
py
2023-02-28T11:04:24Z
cleanvul_py_t3_00041_after
def refresh_token(self) -> None: """Refresh an expired token using the refresh token Raises ------ Exception Authentication Error! """ self.log.info("Refreshing token") assert self.__refresh_url, \ "Refresh URL not found, did you authentic...
0
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00042_before
def saveProviders(self, newznab_string='', torrentrss_string='', provider_order=None, **kwargs): newznabProviderDict = dict( zip((x.get_id() for x in sickbeard.newznabProviderList), sickbeard.newznabProviderList)) finished_names = [] # add all the newznab info we got into our list ...
1
py
Hide passwords in plain html, for when SR is not password protected (#4361) * Hide passwords in plain html, for when SR is not password protected * XMLEscape parameter values sent as GET or POST
https://github.com/SickRage/SickRage/commit/8156a74a68aea930d1e1047baba8b115c3abfc44
null
null
sickbeard/webserve.py
3
py
2018-03-10T07:49:44Z
cleanvul_py_t3_00042_after
def saveProviders(self, newznab_string='', torrentrss_string='', provider_order=None, **kwargs): newznabProviderDict = dict( zip((x.get_id() for x in sickbeard.newznabProviderList), sickbeard.newznabProviderList)) finished_names = [] # add all the newznab info we got into our list ...
0
py
Added option to turn off privilege dropping
https://github.com/ReFirmLabs/binwalk/commit/bd2c3566d31d2ed85cedad8a01993589c78291c6
null
null
src/binwalk/modules/extractor.py
3
py
2021-09-01T15:51:09Z
cleanvul_py_t3_00043_before
def load(self): user_info = pwd.getpwnam(self.UNPRIVILEGED_USER_NAME) self.unpriv_uid = user_info.pw_uid self.unpriv_gid = user_info.pw_gid # Holds a list of extraction rules loaded either from a file or when # manually specified. self.extract_rules = [] # The in...
1
py
Added option to turn off privilege dropping
https://github.com/ReFirmLabs/binwalk/commit/bd2c3566d31d2ed85cedad8a01993589c78291c6
null
null
src/binwalk/modules/extractor.py
3
py
2021-09-01T15:51:09Z
cleanvul_py_t3_00043_after
def load(self): self.unpriv_uid = None self.unpriv_gid = None if self.enabled is True and self.unsafe_extraction is False: if os.getuid() != 0: raise ModuleException("Binwalk requires root privileges to safely execute external extraction utilities as an unprivileged ...
0
py
Validate SqoopHook connection string and disable extra options from hook methods Check that the connection string constructed using the connection's `host`, `port` and `schema` does not contain query params as it is not intended. Additionally, also disable the `extra_import_options` and `extra_export_options` argument...
https://github.com/apache/airflow/commit/4d6254a2f335bd963081537a051c043093726e08
null
null
airflow/providers/apache/sqoop/hooks/sqoop.py
3
py
2023-08-02T14:00:39Z
cleanvul_py_t3_00045_before
def _prepare_command(self, export: bool = False) -> list[str]: if "?" in self.conn.host: raise ValueError("The sqoop connection host should not contain a '?' character") sqoop_cmd_type = "export" if export else "import" connection_cmd = ["sqoop", sqoop_cmd_type] for key, va...
1
py
Validate SqoopHook connection string and disable extra options from hook methods Check that the connection string constructed using the connection's `host`, `port` and `schema` does not contain query params as it is not intended. Additionally, also disable the `extra_import_options` and `extra_export_options` argument...
https://github.com/apache/airflow/commit/4d6254a2f335bd963081537a051c043093726e08
null
null
airflow/providers/apache/sqoop/hooks/sqoop.py
3
py
2023-08-02T14:00:39Z
cleanvul_py_t3_00045_after
def _prepare_command(self, export: bool = False) -> list[str]: sqoop_cmd_type = "export" if export else "import" connection_cmd = ["sqoop", sqoop_cmd_type] for key, value in self.properties.items(): connection_cmd += ["-D", f"{key}={value}"] if self.namenode: co...
0
py
Apply `os.path.basename` before `.` or `..` check in `FTPArtifactRepository` (#10657) Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
https://github.com/mlflow/mlflow/commit/b9ab9ed77e1deda9697fe472fb1079fd428149ee
null
null
mlflow/store/artifact/ftp_artifact_repo.py
3
py
2023-12-12T08:35:51Z
cleanvul_py_t3_00046_before
def list_artifacts(self, path=None): with self.get_ftp_client() as ftp: artifact_dir = self.path list_dir = posixpath.join(artifact_dir, path) if path else artifact_dir if not self._is_dir(ftp, list_dir): return [] artifact_files = ftp.nlst(list_di...
1
py
Apply `os.path.basename` before `.` or `..` check in `FTPArtifactRepository` (#10657) Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
https://github.com/mlflow/mlflow/commit/b9ab9ed77e1deda9697fe472fb1079fd428149ee
null
null
mlflow/store/artifact/ftp_artifact_repo.py
3
py
2023-12-12T08:35:51Z
cleanvul_py_t3_00046_after
def list_artifacts(self, path=None): with self.get_ftp_client() as ftp: artifact_dir = self.path list_dir = posixpath.join(artifact_dir, path) if path else artifact_dir if not self._is_dir(ftp, list_dir): return [] artifact_files = ftp.nlst(list_di...
0
py
Fix problem with jail and zone connection plugins and symlinks from within the jail/zone.
https://github.com/ansible/ansible/commit/ca2f2c4ebd7b5e097eab0a710f79c1f63badf95b
null
null
lib/ansible/plugins/connections/zone.py
3
py
2015-06-19T16:41:48Z
cleanvul_py_t3_00047_before
def put_file(self, in_path, out_path): ''' transfer a file from local to zone ''' out_path = self._normalize_path(out_path, self.get_zone_path()) vvv("PUT %s TO %s" % (in_path, out_path), host=self.zone) self._copy_file(in_path, out_path)
1
py
Fix problem with jail and zone connection plugins and symlinks from within the jail/zone.
https://github.com/ansible/ansible/commit/ca2f2c4ebd7b5e097eab0a710f79c1f63badf95b
null
null
lib/ansible/plugins/connections/zone.py
3
py
2015-06-19T16:41:48Z
cleanvul_py_t3_00047_after
def put_file(self, in_path, out_path): ''' transfer a file from local to zone ''' vvv("PUT %s TO %s" % (in_path, out_path), host=self.zone) with open(in_path, 'rb') as in_file: p = self._buffered_exec_command('dd of=%s' % out_path, None, stdin=in_file) try: ...
0
py
Fix SSRF: do not use urljoin, quote uuids
https://github.com/recurly/recurly-client-python/commit/049c74699ce93cf126feff06d632ea63fba36742
null
null
recurly/resource.py
3
py
2017-11-09T00:45:28Z
cleanvul_py_t3_00048_before
def count(cls, **kwargs): """Return a count of server side resources given filtering arguments in kwargs. """ url = urljoin(recurly.base_uri(), cls.collection_path) if kwargs: url = '%s?%s' % (url, urlencode(kwargs)) return Page.count_for_url(url)
1
py
Fix SSRF: do not use urljoin, quote uuids
https://github.com/recurly/recurly-client-python/commit/049c74699ce93cf126feff06d632ea63fba36742
null
null
recurly/resource.py
3
py
2017-11-09T00:45:28Z
cleanvul_py_t3_00048_after
def count(cls, **kwargs): """Return a count of server side resources given filtering arguments in kwargs. """ url = recurly.base_uri() + cls.collection_path if kwargs: url = '%s?%s' % (url, urlencode(kwargs)) return Page.count_for_url(url)
0
py
perf: 优化 Playbook 文件创建逻辑
https://github.com/jumpserver/jumpserver/commit/d0321a74f1713d031560341c8fd0a1859e6510d8
null
null
apps/ops/api/playbook.py
3
py
2023-09-19T10:04:24Z
cleanvul_py_t3_00050_before
def generate_tree(playbook, root_path, expand_key=None): nodes = [{ "name": playbook.name, "title": playbook.name, "id": 'root', "isParent": True, "open": True, "pId": '', "temp": False }] for path, dirs, files i...
1
py
perf: 优化 Playbook 文件创建逻辑
https://github.com/jumpserver/jumpserver/commit/d0321a74f1713d031560341c8fd0a1859e6510d8
null
null
apps/ops/api/playbook.py
3
py
2023-09-19T10:04:24Z
cleanvul_py_t3_00050_after
def generate_tree(playbook, root_path, expand_key=None): nodes = [{ "name": playbook.name, "title": playbook.name, "id": 'root', "isParent": True, "open": True, "pId": '', "temp": False }] for path, dirs, files i...
0
py
Fix SSRF: do not use urljoin, quote uuids
https://github.com/recurly/recurly-client-python/commit/049c74699ce93cf126feff06d632ea63fba36742
null
null
recurly/resource.py
3
py
2017-11-09T00:45:28Z
cleanvul_py_t3_00051_before
def all(cls, **kwargs): """Return a `Page` of instances of this `Resource` class from its general collection endpoint. Only `Resource` classes with specified `collection_path` endpoints can be requested with this method. Any provided keyword arguments are passed to the API endpo...
1
py
Fix SSRF: do not use urljoin, quote uuids
https://github.com/recurly/recurly-client-python/commit/049c74699ce93cf126feff06d632ea63fba36742
null
null
recurly/resource.py
3
py
2017-11-09T00:45:28Z
cleanvul_py_t3_00051_after
def all(cls, **kwargs): """Return a `Page` of instances of this `Resource` class from its general collection endpoint. Only `Resource` classes with specified `collection_path` endpoints can be requested with this method. Any provided keyword arguments are passed to the API endpo...
0
py
fix: sanitize 2fa response
https://github.com/frappe/frappe/commit/18292060274ec89e5a9b1f672d8e785f551a8b40
null
null
frappe/twofactor.py
3
py
2020-08-13T12:07:08Z
cleanvul_py_t3_00052_before
def process_2fa_for_otp_app(user, otp_secret, otp_issuer): '''Process OTP App method for 2fa.''' totp_uri = pyotp.TOTP(otp_secret).provisioning_uri(user, issuer_name=otp_issuer) if frappe.db.get_default(user + '_otplogin'): otp_setup_completed = True else: otp_setup_completed = False verification_obj = { 't...
1
py
fix: sanitize 2fa response
https://github.com/frappe/frappe/commit/18292060274ec89e5a9b1f672d8e785f551a8b40
null
null
frappe/twofactor.py
3
py
2020-08-13T12:07:08Z
cleanvul_py_t3_00052_after
def process_2fa_for_otp_app(user, otp_secret, otp_issuer): '''Process OTP App method for 2fa.''' totp_uri = pyotp.TOTP(otp_secret).provisioning_uri(user, issuer_name=otp_issuer) if frappe.db.get_default(user + '_otplogin'): otp_setup_completed = True else: otp_setup_completed = False verification_obj = { 'm...
0
py
ROB : fix infinite loop due to Invalid object fixes #1329 *prevent loop within dictionnaries where objects not respecting standard *fix cmap warnings due to "numbered" characters ( #2d instead of -) *apply unnumbering to nameobject *add _get_indirect_object for debug/dev purpose *add some missing seeks (no issue repor...
https://github.com/py-pdf/pypdf/commit/f88a1b022de5822261abec4e7dd9fa0e457a4ee7
null
null
PyPDF2/_cmap.py
3
py
2022-09-07T21:59:19Z
cleanvul_py_t3_00053_before
def parse_encoding( ft: DictionaryObject, space_code: int ) -> Tuple[Union[str, Dict[int, str]], int]: encoding: Union[str, List[str], Dict[int, str]] = [] if "/Encoding" not in ft: try: if "/BaseFont" in ft and cast(str, ft["/BaseFont"]) in charset_encoding: encoding = d...
1
py
ROB : fix infinite loop due to Invalid object fixes #1329 *prevent loop within dictionnaries where objects not respecting standard *fix cmap warnings due to "numbered" characters ( #2d instead of -) *apply unnumbering to nameobject *add _get_indirect_object for debug/dev purpose *add some missing seeks (no issue repor...
https://github.com/py-pdf/pypdf/commit/f88a1b022de5822261abec4e7dd9fa0e457a4ee7
null
null
PyPDF2/_cmap.py
3
py
2022-09-07T21:59:19Z
cleanvul_py_t3_00053_after
def parse_encoding( ft: DictionaryObject, space_code: int ) -> Tuple[Union[str, Dict[int, str]], int]: encoding: Union[str, List[str], Dict[int, str]] = [] if "/Encoding" not in ft: try: if "/BaseFont" in ft and cast(str, ft["/BaseFont"]) in charset_encoding: encoding = d...
0
py
Merge pull request from GHSA-p6p2-qq95-vq5h * Removing custom connector template functions * Updating connector template modal description * Adding function upload tests
https://github.com/ethyca/fides/commit/5989b5fa744c8d8c340963b895a054883549358a
null
null
src/fides/api/service/connectors/saas/connector_registry_service.py
3
py
2023-09-05T19:51:11Z
cleanvul_py_t3_00056_before
def _load_connector_templates(self) -> None: logger.info("Loading connectors templates from the data/saas directory") for file in os.listdir("data/saas/config"): if file.endswith(".yml"): config_file = os.path.join("data/saas/config", file) config_dict = load_...
1
py
Merge pull request from GHSA-p6p2-qq95-vq5h * Removing custom connector template functions * Updating connector template modal description * Adding function upload tests
https://github.com/ethyca/fides/commit/5989b5fa744c8d8c340963b895a054883549358a
null
null
src/fides/api/service/connectors/saas/connector_registry_service.py
3
py
2023-09-05T19:51:11Z
cleanvul_py_t3_00056_after
def _load_connector_templates(self) -> None: """Load connector templates into the _templates dictionary"""
0
py
Add Clickjacking Defense
https://github.com/ikus060/rdiffweb/commit/7294bb7466532762c93d711211e5958940c1b428
null
null
rdiffweb/tools/security.py
3
py
2022-09-08T11:57:01Z
cleanvul_py_t3_00057_before
def _setup(self): cherrypy.request.hooks.attach('before_finalize', self._set_same_site) return super()._setup()
1
py
Add Clickjacking Defense
https://github.com/ikus060/rdiffweb/commit/7294bb7466532762c93d711211e5958940c1b428
null
null
rdiffweb/tools/security.py
3
py
2022-09-08T11:57:01Z
cleanvul_py_t3_00057_after
def _setup(self): cherrypy.request.hooks.attach('before_finalize', self._set_headers) return super()._setup()
0
py
Merge pull request from GHSA-74m5-2c7w-9w3x * ♻️ Refactor multipart parser logic to support limiting max fields and files * ✨ Add support for new request.form() parameters max_files and max_fields * ✅ Add tests for limiting max fields and files in form data * 📝 Add docs about request.form() with new parameters max...
https://github.com/encode/starlette/commit/8c74c2c8dba7030154f8af18e016136bea1938fa
null
null
starlette/formparsers.py
3
py
2023-02-14T08:01:32Z
cleanvul_py_t3_00060_before
def on_part_end(self) -> None: message = (MultiPartMessage.PART_END, b"") self.messages.append(message)
1
py
Merge pull request from GHSA-74m5-2c7w-9w3x * ♻️ Refactor multipart parser logic to support limiting max fields and files * ✨ Add support for new request.form() parameters max_files and max_fields * ✅ Add tests for limiting max fields and files in form data * 📝 Add docs about request.form() with new parameters max...
https://github.com/encode/starlette/commit/8c74c2c8dba7030154f8af18e016136bea1938fa
null
null
starlette/formparsers.py
3
py
2023-02-14T08:01:32Z
cleanvul_py_t3_00060_after
def on_part_end(self) -> None: if self._current_part.file is None: self.items.append( ( self._current_part.field_name, _user_safe_decode(self._current_part.data, self._charset), ) ) else: self._fi...
0
py
adding patch for found security bug
https://github.com/mitre/caldera/commit/9c8fb74c0b1b8d814ac62ff729f27fb23408b75a
null
null
app/service/auth_svc.py
3
py
2020-03-18T16:00:06Z
cleanvul_py_t3_00061_before
async def get_permissions(self, request): identity_policy = request.config_dict.get('aiohttp_security_identity_policy') identity = await identity_policy.identify(request) if identity in self.user_map: return [self.Access[p.upper()] for p in self.user_map[identity].permissions] ...
1
py
adding patch for found security bug
https://github.com/mitre/caldera/commit/9c8fb74c0b1b8d814ac62ff729f27fb23408b75a
null
null
app/service/auth_svc.py
3
py
2020-03-18T16:00:06Z
cleanvul_py_t3_00061_after
async def get_permissions(self, request): identity_policy = request.config_dict.get('aiohttp_security_identity_policy') identity = await identity_policy.identify(request) if identity in self.user_map: return [self.Access[p.upper()] for p in self.user_map[identity].permissions] ...
0
py
Merge pull request from GHSA-mq5p-2mcr-m52j make positional args explicit
https://github.com/jupyterhub/nbgitpuller/commit/07690644f29a566011dd0d7ba14cae3eb0490481
null
null
nbgitpuller/pull.py
3
py
2021-08-25T12:23:02Z
cleanvul_py_t3_00062_before
def branch_exists(self, branch): """ This checks to make sure the branch we are told to access exists in the repo """ try: heads = subprocess.run( ["git", "ls-remote", "--heads", self.git_url], capture_output=True, text=...
1
py
Merge pull request from GHSA-mq5p-2mcr-m52j make positional args explicit
https://github.com/jupyterhub/nbgitpuller/commit/07690644f29a566011dd0d7ba14cae3eb0490481
null
null
nbgitpuller/pull.py
3
py
2021-08-25T12:23:02Z
cleanvul_py_t3_00062_after
def branch_exists(self, branch): """ This checks to make sure the branch we are told to access exists in the repo """ try: heads = subprocess.run( ["git", "ls-remote", "--heads", "--", self.git_url], capture_output=True, ...
0
py
fix: [security] fixes a security issue when used as remote transform the MISP connection being shared by all the users
https://github.com/MISP/MISP-maltego/commit/3ccde66dab4096ab5663e69f352992cc73e1160b
null
null
src/MISP_maltego/transforms/galaxytoevent.py
3
py
2020-05-15T06:59:20Z
cleanvul_py_t3_00064_before
def do_transform(self, request, response, config): response += check_update(config) misp = get_misp_connection(config, request.parameters) if request.entity.tag_name: tag_name = request.entity.tag_name else: tag_name = request.entity.value events_json = mi...
1
py
fix: [security] fixes a security issue when used as remote transform the MISP connection being shared by all the users
https://github.com/MISP/MISP-maltego/commit/3ccde66dab4096ab5663e69f352992cc73e1160b
null
null
src/MISP_maltego/transforms/galaxytoevent.py
3
py
2020-05-15T06:59:20Z
cleanvul_py_t3_00064_after
def do_transform(self, request, response, config): response += check_update(config) conn = MISPConnection(config, request.parameters) if request.entity.tag_name: tag_name = request.entity.tag_name else: tag_name = request.entity.value events_json = conn.mi...
0
py
perf: 优化 Playbook 文件创建逻辑
https://github.com/jumpserver/jumpserver/commit/d0321a74f1713d031560341c8fd0a1859e6510d8
null
null
apps/ops/api/playbook.py
3
py
2023-09-19T10:04:24Z
cleanvul_py_t3_00065_before
def delete(self, request, **kwargs): playbook_id = kwargs.get('pk') playbook = get_object_or_404(Playbook, id=playbook_id) work_path = playbook.work_dir file_key = request.query_params.get('key', '') if not file_key: return Response({'msg': 'key is required'}, status=...
1
py
perf: 优化 Playbook 文件创建逻辑
https://github.com/jumpserver/jumpserver/commit/d0321a74f1713d031560341c8fd0a1859e6510d8
null
null
apps/ops/api/playbook.py
3
py
2023-09-19T10:04:24Z
cleanvul_py_t3_00065_after
def delete(self, request, **kwargs): playbook_id = kwargs.get('pk') playbook = get_object_or_404(Playbook, id=playbook_id) work_path = playbook.work_dir file_key = request.query_params.get('key', '') if not file_key: raise JMSException(code='file_key_is_required', det...
0
py