Skip to content

Commit

Permalink
Add input validation for user_token
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero committed Nov 13, 2024
1 parent af2ecae commit b2502b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,8 @@ def generate_source_params(args):

def build_credentials_header(auth_input_arg = None):
if auth_input_arg:
if len(auth_input_arg.split(':')) != 2:
error("Auth string is not in the form of 'user:token' ")
username, api_token = auth_input_arg.split(':')
else:
username, api_token = get_credentials(JENKINS_URL)
Expand Down

0 comments on commit b2502b0

Please sign in to comment.