Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAPP-30822: Updated requests modules #18

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2016-2023 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
7 changes: 1 addition & 6 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Splunk SOAR Phantom
Copyright (c) 2016-2022 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Third-party Software Attributions:

Expand All @@ -14,8 +14,3 @@ Library: python-magic
Version: 0.4.18
License: MIT
Copyright 2001-2014 Adam Hupp

Library: requests
Version: 2.25.0
License: Apache 2.0
Kenneth Reitz
646 changes: 323 additions & 323 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: __init__.py
#
# Copyright (c) 2016-2023 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
8 changes: 0 additions & 8 deletions exclude_files.txt

This file was deleted.

2 changes: 1 addition & 1 deletion manual_readme_content.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[comment]: # " File: README.md"
[comment]: # " Copyright (c) 2016-2023 Splunk Inc."
[comment]: # " Copyright (c) 2016-2024 Splunk Inc."
[comment]: # ""
[comment]: # "Licensed under the Apache License, Version 2.0 (the 'License');"
[comment]: # "you may not use this file except in compliance with the License."
Expand Down
32 changes: 14 additions & 18 deletions phantom.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"publisher": "Splunk",
"type": "information",
"main_module": "phantom_connector.py",
"app_version": "3.6.1",
"app_version": "3.6.2",
"latest_tested_versions": [
"Splunk Phantom PlatformAPI v5.3.1",
"SOAR On-prem v5.3.1.84890",
Expand All @@ -19,7 +19,7 @@
"product_version_regex": ".*",
"min_phantom_version": "5.2.0",
"fips_compliant": true,
"license": "Copyright (c) 2016-2023 Splunk Inc.",
"license": "Copyright (c) 2016-2024 Splunk Inc.",
"logo": "logo_splunk.svg",
"contributors": [
{
Expand Down Expand Up @@ -2481,32 +2481,28 @@
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "certifi",
"input_file": "wheels/py3/certifi-2022.5.18.1-py3-none-any.whl"
"module": "python_magic",
"input_file": "wheels/shared/python_magic-0.4.18-py2.py3-none-any.whl"
},
{
"module": "chardet",
"input_file": "wheels/shared/chardet-3.0.4-py2.py3-none-any.whl"
},
"module": "soupsieve",
"input_file": "wheels/py3/soupsieve-2.3.2.post1-py3-none-any.whl"
}
]
},
"pip39_dependencies": {
"wheel": [
{
"module": "idna",
"input_file": "wheels/shared/idna-2.10-py2.py3-none-any.whl"
"module": "beautifulsoup4",
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "python_magic",
"input_file": "wheels/shared/python_magic-0.4.18-py2.py3-none-any.whl"
},
{
"module": "requests",
"input_file": "wheels/shared/requests-2.25.0-py2.py3-none-any.whl"
},
{
"module": "soupsieve",
"input_file": "wheels/py3/soupsieve-2.3.2.post1-py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.9-py2.py3-none-any.whl"
"input_file": "wheels/py3/soupsieve-2.5-py3-none-any.whl"
}
]
}
Expand Down
12 changes: 6 additions & 6 deletions phantom_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: phantom_connector.py
#
# Copyright (c) 2016-2023 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -746,9 +746,9 @@ def _add_file_to_vault(self, action_result, data_stream, file_name, recursive, c
with open(save_path, 'wb') as uncompressed_file:
uncompressed_file.write(data_stream)
except IOError as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
try:
if "File name too long" in error_msg:
if "File name too long" in error_message:
new_file_name = "ph_long_file_name_{}{}".format(self._level, random_suffix)
save_path = os.path.join(vault_tmp_dir, new_file_name)
self.debug_print("Original filename: {}".format(file_name))
Expand Down Expand Up @@ -897,9 +897,9 @@ def _extract_file(self, action_result, file_path, file_name, recursive, containe
if phantom.is_fail(ret_val):
return ret_val
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_msg = error_msg.replace(compressed_file, file_name)
return action_result.set_status(phantom.APP_ERROR, "Unable to open the zip file: {}. {}".format(file_path, error_msg))
error_message = self._get_error_message_from_exception(e)
error_message = error_message.replace(compressed_file, file_name)
return action_result.set_status(phantom.APP_ERROR, "Unable to open the zip file: {}. {}".format(file_path, error_message))

return (phantom.APP_SUCCESS)

Expand Down
2 changes: 1 addition & 1 deletion phantom_consts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: phantom_consts.py
#
# Copyright (c) 2016-2023 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion phantom_multiple_actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block widget_content %} <!-- Main Start Block -->

<!-- File: phantom_multiple_actions.html
Copyright (c) 2016-2023 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion phantom_views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: phantom_views.py
#
# Copyright (c) 2016-2023 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions release_notes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**Unreleased**
* Updated requests and certifi dependencies in order to use platform packages [PAPP-30822,PAPP-31096]
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
beautifulsoup4==4.9.1
python-magic==0.4.18
requests==2.25.0
Binary file removed wheels/py3/certifi-2022.5.18.1-py3-none-any.whl
Binary file not shown.
Binary file added wheels/py3/soupsieve-2.5-py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/chardet-3.0.4-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/idna-2.10-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/requests-2.25.0-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/urllib3-1.26.9-py2.py3-none-any.whl
Binary file not shown.