diff --git a/src/server/session/join.rs b/src/server/session/join.rs index a5e1c06..4c20107 100644 --- a/src/server/session/join.rs +++ b/src/server/session/join.rs @@ -48,7 +48,13 @@ pub async fn join(mut req: Request) -> Result { return Err(YggdrasilError::new_base("Account has no profile.").into()) }; - if body.profile_uuid != profile.uuid { + // Re-hyphenate token if not already + let given_uuid = match body.profile_uuid.find("-") { + None => Token::rehyphenate(body.profile_uuid), + Some(_) => body.profile_uuid + }; + + if given_uuid != profile.uuid { // UUID doesn't match return Err(YggdrasilError::new_base("UUID doesn't match.").into()) }