Skip to content

Commit

Permalink
Dont allow uploads if password has not been changed
Browse files Browse the repository at this point in the history
  • Loading branch information
devcurmudgeon committed Aug 31, 2015
1 parent 84a1f0f commit 807db47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions artifactserver/kbas.py
Expand Up @@ -66,11 +66,12 @@ def get_artifact(cache_id):

@app.get('/status')
def status():
return ('Status coming soon...')
return ('ybd kbas status coming soon...')

@app.post('/upload')
def post_artifact():
if request.forms.get('password') != config['password']:
if config['password'] is 'insecure' or \
request.forms.get('password') != config['password']:
print 'Upload attempt: password fail'
response.status = 401 # unauthorized
return
Expand Down

0 comments on commit 807db47

Please sign in to comment.