{"record":{"id":"dfce3f1030761484","repo":"sqlmapproject/sqlmap","slug":"invalid-choice","errorCode":null,"errorMessage":"invalid choice","messagePattern":"invalid choice","errorType":"validation","errorClass":"SqlmapValueException","httpStatus":null,"severity":"error","filePath":"lib/controller/controller.py","lineNumber":145,"sourceCode":"\n                message += \"[%d] place: %s, parameter: \" % (i, place)\n                message += \"%s, type: %s\" % (parameter, ptype)\n\n                if i == 0:\n                    message += \" (default)\"\n\n                message += \"\\n\"\n\n        message += \"[q] Quit\"\n        choice = readInput(message, default='0').upper()\n\n        if isDigit(choice) and int(choice) < len(kb.injections) and int(choice) >= 0:\n            index = int(choice)\n        elif choice == 'Q':\n            raise SqlmapUserQuitException\n        else:\n            errMsg = \"invalid choice\"\n            raise SqlmapValueException(errMsg)\n\n        kb.injection = kb.injections[index]\n\ndef _formatInjection(inj):\n    paramType = conf.method if conf.method not in (None, HTTPMETHOD.GET, HTTPMETHOD.POST) else inj.place\n    data = \"Parameter: %s (%s)\\n\" % (inj.parameter, paramType)\n\n    for stype, sdata in inj.data.items():\n        title = sdata.title\n        vector = sdata.vector\n        comment = sdata.comment\n        payload = agent.adjustLateValues(sdata.payload)\n        if inj.place == PLACE.CUSTOM_HEADER:\n            payload = payload.split(',', 1)[1]\n        if stype == PAYLOAD.TECHNIQUE.UNION:\n            count = re.sub(r\"(?i)(\\(.+\\))|(\\blimit[^a-z]+)\", \"\", sdata.payload).count(',') + 1\n            title = re.sub(r\"\\d+ to \\d+\", str(count), title)\n            vector = agent.forgeUnionQuery(\"[QUERY]\", vector[0], vector[1], vector[2], None, None, vector[5], vector[6])","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/controller/controller.py#L127-L163","documentation":"Error \"invalid choice\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/controller/controller.py:145 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":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}