{"record":{"id":"914ad751f93571b2","repo":"flippercloud/flipper","slug":"no-signatures-found-matching-the-expected-signatur","errorCode":null,"errorMessage":"No signatures found matching the expected signature for payload","messagePattern":"No signatures found matching the expected signature for payload","errorType":"exception","errorClass":"Flipper::Cloud::MessageVerifier::InvalidSignature","httpStatus":null,"severity":"error","filePath":"lib/flipper/cloud/message_verifier.rb","lineNumber":60,"sourceCode":"      # - no signatures matching the expected signature\n      # - a tolerance is provided and the timestamp is not within the\n      #   tolerance\n      #\n      # Returns true otherwise.\n      def verify(payload, header, tolerance: nil)\n        begin\n          timestamp, signatures = get_timestamp_and_signatures(header)\n        rescue StandardError\n          raise InvalidSignature, \"Unable to extract timestamp and signatures from header\"\n        end\n\n        if signatures.empty?\n          raise InvalidSignature, \"No signatures found with expected version #{@version}\"\n        end\n\n        expected_sig = generate(payload, timestamp)\n        unless signatures.any? { |s| secure_compare(expected_sig, s) }\n          raise InvalidSignature, \"No signatures found matching the expected signature for payload\"\n        end\n\n        if tolerance && timestamp < Time.now - tolerance\n          raise InvalidSignature, \"Timestamp outside the tolerance zone (#{Time.at(timestamp)})\"\n        end\n\n        true\n      end\n\n      private\n\n      # Extracts the timestamp and the signature(s) with the desired version\n      # from the header\n      def get_timestamp_and_signatures(header)\n        list_items = header.split(/,\\s*/).map { |i| i.split(\"=\", 2) }\n        timestamp = Integer(list_items.select { |i| i[0] == \"t\" }[0][1])\n        signatures = list_items.select { |i| i[0] == @version }.map { |i| i[1] }\n        [Time.at(timestamp), signatures]","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/flippercloud/flipper/blob/1f86de3ec91521585b156445e156642938b19cb0/lib/flipper/cloud/message_verifier.rb#L42-L78","documentation":"Error \"No signatures found matching the expected signature for payload\" thrown in flippercloud/flipper.","triggerScenarios":"Thrown at lib/flipper/cloud/message_verifier.rb:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the webhook secret matches the one shown in Flipper Cloud for this endpoint; a wrong secret produces non-matching signatures","Verify against the raw, unparsed request body; any modification (whitespace, key order) breaks the HMAC","Check for middleware that mutates the body before verification (e.g. params parsing, compression)"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1f86de3ec91521585b156445e156642938b19cb0","analyzedAt":"2026-08-23T04:36:09.896Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}