{"record":{"id":"fe18878319658f52","repo":"ruby/rubygems","slug":"security-device-verification-failed-page-at-req","errorCode":null,"errorMessage":"Security device verification failed: Page at #{req_uri.path} not found.","messagePattern":"Security device verification failed: Page at #(.+?) not found\\.","errorType":"exception","errorClass":"Gem::WebauthnVerificationError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/gemcutter_utilities/webauthn_listener.rb","lineNumber":60,"sourceCode":"        thread[:error] = e\n      ensure\n        server.close\n      end\n    end\n\n    def wait_for_otp_code(server)\n      loop do\n        socket = server.accept\n        request_line = socket.gets\n\n        method, req_uri, _protocol = request_line.split(\" \")\n        req_uri = Gem::URI.parse(req_uri)\n\n        responder = SocketResponder.new(socket)\n\n        unless root_path?(req_uri)\n          responder.send(NotFoundResponse.for(host))\n          raise Gem::WebauthnVerificationError, \"Page at #{req_uri.path} not found.\"\n        end\n\n        case method.upcase\n        when \"OPTIONS\"\n          responder.send(NoContentResponse.for(host))\n          next # will be GET\n        when \"GET\"\n          if otp = parse_otp_from_uri(req_uri)\n            responder.send(OkResponse.for(host))\n            return otp\n          end\n          responder.send(BadRequestResponse.for(host))\n          raise Gem::WebauthnVerificationError, \"Did not receive OTP from #{host}.\"\n        else\n          responder.send(MethodNotAllowedResponse.for(host))\n          raise Gem::WebauthnVerificationError, \"Invalid HTTP method #{method.upcase} received.\"\n        end\n      end","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/gemcutter_utilities/webauthn_listener.rb#L42-L78","documentation":"Error \"Security device verification failed: Page at #{req_uri.path} not found.\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/gemcutter_utilities/webauthn_listener.rb:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}