{"record":{"id":"f2f7a4ddaa8a750c","repo":"sqlmapproject/sqlmap","slug":"option-csrf-method-requires-usage-of-option","errorCode":null,"errorMessage":"option '--csrf-method' requires usage of option '--csrf-token'","messagePattern":"option '--csrf-method' requires usage of option '--csrf-token'","errorType":"exception","errorClass":"SqlmapSyntaxException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":2996,"sourceCode":"    if conf.safePost and not conf.safeUrl:\n        errMsg = \"option '--safe-post' requires usage of option '--safe-url'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.safeFreq and not any((conf.safeUrl, conf.safeReqFile)):\n        errMsg = \"option '--safe-freq' requires usage of option '--safe-url' or '--safe-req'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.safeReqFile and any((conf.safeUrl, conf.safePost)):\n        errMsg = \"option '--safe-req' is incompatible with option '--safe-url' and option '--safe-post'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.csrfUrl and not conf.csrfToken:\n        errMsg = \"option '--csrf-url' requires usage of option '--csrf-token'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.csrfMethod and not conf.csrfToken:\n        errMsg = \"option '--csrf-method' requires usage of option '--csrf-token'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.csrfData and not conf.csrfToken:\n        errMsg = \"option '--csrf-data' requires usage of option '--csrf-token'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.csrfToken and conf.threads > 1:\n        errMsg = \"option '--csrf-token' is incompatible with option '--threads'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.requestFile and conf.url and conf.url != DUMMY_URL:\n        errMsg = \"option '-r' is incompatible with option '-u' ('--url')\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.direct and conf.proxy:\n        errMsg = \"option '-d' is incompatible with option '--proxy'\"\n        raise SqlmapSyntaxException(errMsg)\n\n    if conf.direct and conf.tor:","sourceCodeStart":2978,"sourceCodeEnd":3014,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L2978-L3014","documentation":"Error \"option '--csrf-method' requires usage of option '--csrf-token'\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/option.py:2996 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"}