Skip to content

Commit

Permalink
Bug fix for accessing path to the vault temp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bbielinski-splunk committed Nov 30, 2023
1 parent 4ffb665 commit d850b0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions release_notes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**Unreleased**
* Bug fix for accessing path to the vault temp directory [PAPP-32424]
8 changes: 3 additions & 5 deletions rss_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit d850b0c

Please sign in to comment.