{"record":{"id":"1e8ccd6b31f77301","repo":"Pumpkin-MC/Pumpkin","slug":"vine-response-data-too-short-minimum-89-bytes","errorCode":null,"errorMessage":"Vine response data too short (minimum 89 bytes)","messagePattern":"Vine response data too short \\(minimum 89 bytes\\)","errorType":"error_code","errorClass":"VineError","httpStatus":null,"severity":"error","filePath":"crates/pumpkin/src/net/proxy/vine.rs","lineNumber":28,"sourceCode":"use pumpkin_protocol::{\n    Property, java::client::login::CLoginPluginRequest, java::server::login::SLoginPluginResponse,\n    ser::NetworkReadExt,\n};\nuse sha2::{Digest, Sha256};\nuse thiserror::Error;\nuse tracing::debug;\n\nuse crate::net::{GameProfile, java::pending::PendingConnection};\n\npub const VINE_PLAYER_INFO_CHANNEL: &str = \"vine:player_info\";\npub const VINE_FORWARDING_VERSION: i32 = 1;\npub const MAX_TIMESTAMP_DRIFT_SECS: i64 = 30;\n\n#[derive(Error, Debug)]\npub enum VineError {\n    #[error(\"No response data received\")]\n    NoData,\n    #[error(\"Vine response data too short (minimum 89 bytes)\")]\n    DataTooShort,\n    #[error(\"No public key or secret configured for Vine proxy\")]\n    MissingKeyConfig,\n    #[error(\"Invalid Ed25519 public key\")]\n    InvalidPublicKey,\n    #[error(\"Failed to verify Ed25519 signature\")]\n    InvalidSignature,\n    #[error(\"Failed to read forward version\")]\n    FailedReadForwardVersion,\n    #[error(\"Unsupported forwarding version {0}. Expected {1}\")]\n    UnsupportedForwardVersion(i32, i32),\n    #[error(\"Vine timestamp expired or desynchronized: skew of {0}s exceeds limit of {1}s\")]\n    TimestampExpired(i64, i64),\n    #[error(\"Vine challenge nonce mismatch\")]\n    ChallengeMismatch,\n    #[error(\"Missing expected challenge from pending connection\")]\n    MissingChallenge,\n    #[error(\"Failed to read address\")]","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/net/proxy/vine.rs#L10-L46","documentation":"VineError::DataTooShort is raised during the Vine modern forwarding handshake when the login plugin response payload received from the proxy is smaller than the minimum 89 bytes (64-byte Ed25519 signature + VarInt version + 8-byte timestamp + 16-byte challenge nonce). The server refuses to parse the packet because required fields would be missing. It is thrown by receive_vine_plugin_response in crates/pumpkin/src/net/proxy/vine.rs:154-156 and also when the timestamp or nonce slices cannot be read (lines 184, 200).","triggerScenarios":"A proxy responds on the vine:player_info channel with a payload shorter than 89 bytes: the proxy sends an empty/truncated payload, a proxy not implementing Vine forwarding echoes back wrong data, or a malicious/broken client forges a minimal login plugin response.","commonSituations":"The upstream proxy has Vine forwarding disabled or only legacy (BungeeCord) forwarding enabled; the proxy and server run incompatible Vine protocol versions; a client connects directly to the backend bypassing the proxy and fakes the plugin response channel.","solutions":["Verify the proxy (e.g. Velocity or the Vine-compatible proxy) has Vine/modern forwarding ENABLED and is sending the full signed payload","Confirm the proxy and Pumpkin server use the same Vine forwarding version and protocol implementation","Ensure clients cannot connect directly to the backend port; only the proxy should reach it","Capture the raw login plugin response and check its length to see who is sending the malformed packet"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn is_valid_vine_response(data: &[u8]) -> bool {\n    const MIN: usize = 64 + 1 + 8 + 16; // 89 bytes\n    data.len() >= MIN\n}\n// call before handing SLoginPluginResponse data to the verifier","typeGuard":"fn has_full_vine_payload(data: &Option<Box<[u8]>>) -> bool {\n    matches!(data, Some(d) if d.len() >= 64 + 1 + 8 + 16)\n}","tryCatchPattern":"match receive_vine_plugin_response(port, &config, response, challenge) {\n    Err(VineError::DataTooShort) => {\n        tracing::warn!(\"Vine response truncated ({} bytes); check proxy forwarding config\", response.data.map_or(0, |d| d.len()));\n        disconnect(DisconnectReason::InvalidForwarding);\n    }\n    result => result?,\n}","preventionTips":["Only allow the proxy to reach the backend port so random clients cannot send fake plugin responses","Keep proxy forwarding (Vine/modern) enabled and on the same protocol version as the server","Add a startup check that logs the minimum expected payload size when forwarding is enabled","Monitor for repeated short responses — usually signals a non-Vine proxy or direct client connections"],"tags":["network","minecraft","proxy-forwarding","packet-parsing"],"backgroundTag":"unexpected-response-shape","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}