Skip to content

Commit

Permalink
update review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrutha497 committed Nov 28, 2024
1 parent ffa5636 commit 7538a32
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.21.0] - 2024-11-28
### Fixed
- Fixed `[NA-SPOT-SDK-03] URL Path Traversal in Python SDK` from pentesting report

## [3.20.0] - 2024-11-20
### Fixed
- Fixed static analysis issues reported by semgrep tool

## [3.19.0] - 2024-11-06
### Added
- Added `SpotSizeAttributes` model for Azure Stateful Nodes
Expand Down
8 changes: 4 additions & 4 deletions spotinst_sdk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ def __init__(self, session=None,
self.timeout = timeout

def validate_url(self, url):
self.print_output("input url - " + str(self.base_url + url))
self.print_output("parsed_url - " + str(urllib3.util.parse_url(self.base_url + url)))
if str(urllib3.util.parse_url(self.base_url + url)) == self.base_url + url:
self.print_output("Input Url - " + self.base_url + url)
self.print_output("Parsed Url - " + urllib3.util.parse_url(self.base_url + url).url)
if urllib3.util.parse_url(self.base_url + url).url == self.base_url + url:
return self.base_url + url
else:
return "Url is not safe"
raise Exception("UNSAFE_URL")

def send_get(self, url, entity_name, query_params=None):
agent = self.resolve_user_agent()
Expand Down
2 changes: 1 addition & 1 deletion spotinst_sdk2/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.20.2'
__version__ = '3.21.0'

0 comments on commit 7538a32

Please sign in to comment.