diff --git a/LICENSE b/LICENSE index fe5e893..48fc581 100644 --- a/LICENSE +++ b/LICENSE @@ -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. \ No newline at end of file + limitations under the License. diff --git a/release_notes/unreleased.md b/release_notes/unreleased.md index fbcb2fd..2608786 100644 --- a/release_notes/unreleased.md +++ b/release_notes/unreleased.md @@ -1 +1,2 @@ **Unreleased** +* Bug fix for accessing path to the vault temp directory [PAPP-32424] \ No newline at end of file diff --git a/rss_connector.py b/rss_connector.py index 2df36c7..302be8e 100644 --- a/rss_connector.py +++ b/rss_connector.py @@ -100,10 +100,7 @@ def _cmp_with_last_checked_entry(self, entry, last_checked_entry): return False def _save_html(self, html_file, name, container_id): - if hasattr(Vault, 'get_vault_tmp_dir'): - fd, path = tempfile.mkstemp(dir=Vault.get_vault_tmp_dir(), text=True) - else: - fd, path = tempfile.mkstemp(dir='/opt/phantom/vault/tmp', text=True) + fd, path = tempfile.mkstemp(dir=Vault.get_vault_tmp_dir(), text=True) os.write(fd, html_file) os.close(fd) @@ -316,7 +313,8 @@ def finalize(self): headers['Referer'] = 'https://127.0.0.1/login' print("Logging into Platform to get the session id") - r2 = requests.post("https://127.0.0.1/login", verify=verify, data=data, headers=headers, timeout=rc.RSS_DEFAULT_TIMEOUT) + r2 = requests.post("https://127.0.0.1/login", verify=verify, data=data, headers=headers, + timeout=rc.RSS_DEFAULT_TIMEOUT) session_id = r2.cookies['sessionid'] except Exception as e: print("Unable to get session id from the platform. Error: " + str(e))