{"record":{"id":"e3847a024b35611e","repo":"Pumpkin-MC/Pumpkin","slug":"verify-token-does-not-match","errorCode":null,"errorMessage":"verify token does not match","messagePattern":"verify token does not match","errorType":"exception","errorClass":"EncryptionError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/mod.rs","lineNumber":432,"sourceCode":"            )),\n            None => text,\n        });\n    }\n\n    None\n}\n\n#[derive(Error, Debug)]\npub enum EncryptionError {\n    #[error(\"failed to decrypt shared secret\")]\n    FailedDecrypt,\n    #[error(\"shared secret has the wrong length\")]\n    SharedWrongLength,\n    #[error(\"encryption is already enabled\")]\n    AlreadyEncrypted,\n    #[error(\"no encryption request is pending\")]\n    NoPendingVerifyToken,\n    #[error(\"verify token does not match\")]\n    VerifyTokenMismatch,\n}\n\nfn is_valid_player_name(name: &str) -> bool {\n    if name.len() > 16 {\n        return false;\n    }\n    !name.chars().any(|c| c.is_control() || c == ' ')\n}\n\n#[derive(Clone, Copy, Debug)]\npub enum DisconnectReason {\n    Unknown = 0,\n    CantConnectNoInternet = 1,\n    NoPermissions = 2,\n    UnrecoverableError = 3,\n    ThirdPartyBlocked = 4,\n    ThirdPartyNoInternet = 5,","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/mod.rs#L414-L450","documentation":"EncryptionError variant fired when the verify token returned by the client does not match the one the server sent in the encryption request, proving the response was not produced by the legitimate client.","triggerScenarios":"Thrown at crates/pumpkin/src/net/mod.rs:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Abort the handshake and disconnect","Compare tokens with constant-time equality","Log the mismatch at debug level"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}