Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR: fix password server exception when no password is found #9699

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions systemvm/debian/opt/cloud/bin/passwd_server_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,19 @@ def do_GET(self):
if requestType == 'send_my_password':
password = getPassword(clientAddress)
if not password:
self.wfile.write('saved_password')
self.wfile.write('saved_password'.encode())
syslog.syslog('serve_password: requested password not found for %s' % clientAddress)
else:
self.wfile.write(password.encode())
syslog.syslog('serve_password: password sent to %s' % clientAddress)
elif requestType == 'saved_password':
removePassword(clientAddress)
savePasswordFile()
self.wfile.write('saved_password')
self.wfile.write('saved_password'.encode())
syslog.syslog('serve_password: saved_password ack received from %s' % clientAddress)
else:
self.send_response(400)
self.wfile.write('bad_request')
self.wfile.write('bad_request'.encode())
syslog.syslog('serve_password: bad_request from IP %s' % clientAddress)
return

Expand Down
Loading