We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6651741 commit b02f740Copy full SHA for b02f740
.vscode/settings.json
src/actions/rule_id.cc
@@ -17,7 +17,7 @@
17
18
#include <iostream>
19
#include <string>
20
-#include <charconv>
+#include <sstream>
21
22
#include "modsecurity/transaction.h"
23
#include "modsecurity/rule.h"
@@ -28,11 +28,12 @@ namespace actions {
28
29
bool RuleId::init(std::string *error) {
30
std::string a = m_parser_payload;
31
-
32
- const auto format = std::chars_format::fixed;
33
- const auto conv_res = std::from_chars(a.data(), a.data() + a.size(), m_ruleId, format);
34
- if (conv_res.ec == std::errc::invalid_argument || conv_res.ec == std::errc::result_out_of_range) {
35
- // Conversion error
+
+ std::stringstream ss;
+ ss<<a;
+ ss>>m_ruleId;
+ if (ss.fail()) {
36
+ ss.clear();
37
m_ruleId = 0;
38
error->assign("The input \"" + a + "\" does not " \
39
"seems to be a valid rule id.");
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments