From 7c54df65867843b7cabd4f34c2bf832caa338450 Mon Sep 17 00:00:00 2001 From: Nyo Date: Sat, 8 Oct 2016 20:24:16 +0200 Subject: [PATCH] .BANCHO. .FIX. Match passwords are in plain text again, fixed match invites for password protected matches --- events/joinMatchEvent.py | 4 ++-- objects/match.py | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/events/joinMatchEvent.py b/events/joinMatchEvent.py index 9b76a4e..8745a93 100644 --- a/events/joinMatchEvent.py +++ b/events/joinMatchEvent.py @@ -22,8 +22,8 @@ def handle(userToken, packetData): match = glob.matches.matches[matchID] # Hash password if needed - if password != "": - password = generalUtils.stringMd5(password) + #if password != "": + # password = generalUtils.stringMd5(password) # Check password # TODO: Admins can enter every match diff --git a/objects/match.py b/objects/match.py index 99939b9..ce232e5 100644 --- a/objects/match.py +++ b/objects/match.py @@ -47,10 +47,13 @@ class match: self.inProgress = False self.mods = 0 self.matchName = matchName - if matchPassword != "": - self.matchPassword = generalUtils.stringMd5(matchPassword) - else: - self.matchPassword = "" + self.matchPassword = matchPassword + # NOTE: Password used to be md5-hashed, but the client doesn't like that. + # So we're back to plain text passwords, like in normal osu! + #if matchPassword != "": + # self.matchPassword = generalUtils.stringMd5(matchPassword) + #else: + # self.matchPassword = "" self.beatmapID = beatmapID self.beatmapName = beatmapName self.beatmapMD5 = beatmapMD5 @@ -446,10 +449,11 @@ class match: newPassword -- new password string """ - if newPassword != "": - self.matchPassword = generalUtils.stringMd5(newPassword) - else: - self.matchPassword = "" + self.matchPassword = newPassword + #if newPassword != "": + # self.matchPassword = generalUtils.stringMd5(newPassword) + #else: + # self.matchPassword = "" # Send password change to every user in match glob.streams.broadcast(self.streamName, serverPackets.changeMatchPassword(self.matchPassword))