{"record":{"id":"fa94f80f8072c0c7","repo":"Pumpkin-MC/Pumpkin","slug":"you-are-banned-from-authentication-servers","errorCode":null,"errorMessage":"You are banned from Authentication servers","messagePattern":"You are banned from Authentication servers","errorType":"exception","errorClass":"AuthError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/authentication.rs","lineNumber":399,"sourceCode":"        }\n    }\n\n    if not_found_count > 0 {\n        Ok(None)\n    } else if let Some(status) = last_unknown_status {\n        Err(AuthError::UnknownStatusCode(status))\n    } else {\n        Err(AuthError::FailedResponse)\n    }\n}\n\n#[derive(Error, Debug)]\npub enum AuthError {\n    #[error(\"Authentication servers are down\")]\n    FailedResponse,\n    #[error(\"Failed to verify username\")]\n    UnverifiedUsername,\n    #[error(\"You are banned from Authentication servers\")]\n    Banned,\n    #[error(\"Texture Error {0}\")]\n    TextureError(TextureError),\n    #[error(\"You have disallowed actions from Authentication servers\")]\n    DisallowedAction,\n    #[error(\"Failed to parse JSON into Game Profile\")]\n    FailedParse,\n    #[error(\"Unknown Status Code {0}\")]\n    UnknownStatusCode(StatusCode),\n}\n\n#[derive(Error, Debug)]\npub enum TextureError {\n    #[error(\"Invalid URL\")]\n    InvalidURL,\n    #[error(\"Invalid URL scheme for player texture: {0}\")]\n    DisallowedUrlScheme(String),\n    #[error(\"Invalid URL domain for player texture: {0}\")]","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/authentication.rs#L381-L417","documentation":"PacketDecodeError::NotCompressed is raised when a packet arrives without compression framing (uncompressed payload) even though its size exceeds the negotiated compression threshold. After compression is enabled, packets larger than the threshold must be zlib-compressed; an uncompressed packet of that size violates the protocol. This protects against misframed or protocol-violating traffic.","triggerScenarios":"Decoding a packet whose length exceeds the configured compression threshold but whose payload is not zlib-compressed; a client that ignored or mishandled the Set Compression packet.","commonSituations":"Compression enabled mid-connection with a client that never switched; a proxy stripping compression; custom client implementations that toggle compression incorrectly.","solutions":["Verify the Set Compression packet was sent and acknowledged before applying threshold checks.","Check that the client's protocol implementation honors the compression threshold.","If compression is optional for your use case, ensure the threshold/config matches both endpoints.","Close the connection for protocol violations from misbehaving peers."],"exampleFix":"// before\nif !is_compressed(payload) { return Ok(payload.to_vec()); } // silently accepts uncompressed\n// after\nif !is_compressed(payload) && payload.len() > compression_threshold {\n    return Err(PacketDecodeError::NotCompressed);\n}","handlingStrategy":"validation","validationCode":"fn compression_ok(uncompressed: bool, len: usize, threshold: usize) -> bool {\n    !(uncompressed && len > threshold)\n}","typeGuard":"fn requires_compression(len: usize, threshold: usize) -> bool {\n    len > threshold\n}","tryCatchPattern":"match decode_packet(stream).await {\n    Err(PacketDecodeError::NotCompressed) => {\n        warn!(\"uncompressed packet above threshold; protocol violation\");\n        drop(stream);\n    }\n    Ok(p) => handle(p),\n    Err(e) => warn!(\"decode error: {e}\"),\n}","preventionTips":["Ensure both endpoints switch to compression at the same point in the handshake.","Never enable/disable compression mid-connection without a renegotiation.","Test with clients that correctly honor the Set Compression packet.","Check proxy configurations do not strip compression framing."],"tags":["protocol","compression","threshold","packet-decoding"],"backgroundTag":"invalid-state-transition","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}