Adds transformation functions stub

Added stub for all transformations functions supported on
ModSecurity 2.9
This commit is contained in:
Felipe Zimmerle 2015-06-26 17:32:21 -03:00
parent 95cb4c56ab
commit 721f951154
139 changed files with 3528 additions and 23 deletions

View File

@ -28,6 +28,50 @@ pkginclude_HEADERS = \
../headers/modsecurity/intervention.h
ACTIONS = \
actions/action.cc \
actions/block.cc \
actions/phase.cc \
actions/redirect.cc \
actions/rule_id.cc \
actions/status.cc \
actions/transformations/base64_decode.cc \
actions/transformations/base64_decode_ext.cc \
actions/transformations/cmd_line.cc \
actions/transformations/compress_whitespace.cc \
actions/transformations/css_decode.cc \
actions/transformations/escape_seq_decode.cc \
actions/transformations/hex_decode.cc \
actions/transformations/hex_encode.cc \
actions/transformations/html_entity_decode.cc \
actions/transformations/js_decode.cc \
actions/transformations/length.cc \
actions/transformations/lowercase.cc \
actions/transformations/md5.cc \
actions/transformations/none.cc \
actions/transformations/normalise_path.cc \
actions/transformations/normalise_path_win.cc \
actions/transformations/parity_even_7bit.cc \
actions/transformations/parity_odd_7bit.cc \
actions/transformations/parity_zero_7bit.cc \
actions/transformations/remove_comments.cc \
actions/transformations/remove_comments_char.cc \
actions/transformations/remove_nulls.cc \
actions/transformations/remove_whitespace.cc \
actions/transformations/replace_comments.cc \
actions/transformations/replace_nulls.cc \
actions/transformations/sha1.cc \
actions/transformations/sql_hex_decode.cc \
actions/transformations/transformation.cc \
actions/transformations/trim.cc \
actions/transformations/trim_left.cc \
actions/transformations/trim_right.cc \
actions/transformations/url_decode.cc \
actions/transformations/url_decode_uni.cc \
actions/transformations/url_encode.cc \
actions/transformations/utf8_to_unicode.cc
libmodsecurity_la_SOURCES = \
parser/seclang-parser.yy \
parser/seclang-scanner.ll \
@ -76,15 +120,9 @@ libmodsecurity_la_SOURCES = \
operators/str_eq.cc \
operators/str_match.cc \
operators/begins_with.cc \
actions/rule_id.cc \
actions/phase.cc \
actions/action.cc \
actions/block.cc \
actions/redirect.cc \
actions/status.cc \
actions/transformations/transformation.cc \
actions/transformations/trim.cc \
actions/transformations/lowercase.cc
${ACTIONS}
libmodsecurity_la_CFLAGS =

View File

@ -25,6 +25,10 @@
#include "actions/rule_id.h"
#include "actions/phase.h"
#define IF_MATCH(a) \
if (op.compare(1, std::strlen(#a), #a) == 0)
namespace ModSecurity {
namespace actions {

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/base64_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
Base64Decode::Base64Decode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& Base64Decode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation base64decode
*/
assay->debug(4, "Transformation 64 is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class Base64Decode : public Transformation {
public:
explicit Base64Decode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/base64_decode_ext.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
Base64DecodeExt::Base64DecodeExt(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& Base64DecodeExt::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation Base64DecodeExt
*/
assay->debug(4, "Transformation Base64DecodeExt is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_
#define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class Base64DecodeExt : public Transformation {
public:
explicit Base64DecodeExt(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/cmd_line.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
CmdLine::CmdLine(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& CmdLine::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation CmdLine
*/
assay->debug(4, "Transformation CmdLine is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class CmdLine : public Transformation {
public:
explicit CmdLine(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/compress_whitespace.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
CompressWhitespace::CompressWhitespace(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& CompressWhitespace::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation CompressWhitespace
*/
assay->debug(4, "Transformation CompressWhitespace is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class CompressWhitespace : public Transformation {
public:
explicit CompressWhitespace(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/css_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
CssDecode::CssDecode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& CssDecode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation CssDecode
*/
assay->debug(4, "Transformation CssDecode is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class CssDecode : public Transformation {
public:
explicit CssDecode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_

View File

@ -0,0 +1,49 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/escape_seq_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
EscapeSeqDecode::EscapeSeqDecode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& EscapeSeqDecode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation EscapeSeqDecode
*/
assay->debug(4, "Transformation EscapeSeqDecode is not implemented yet.");
return value;
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class EscapeSeqDecode : public Transformation {
public:
explicit EscapeSeqDecode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/hex_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
HexDecode::HexDecode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& HexDecode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation HexDecode
*/
assay->debug(4, "Transformation HexDecode is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class HexDecode : public Transformation {
public:
explicit HexDecode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64DECODE_H_

View File

@ -0,0 +1,49 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/hex_encode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
HexEncode::HexEncode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& HexEncode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation HexEncode
*/
assay->debug(4, "Transformation HexEncode is not implemented yet.");
return value;
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_BASE64DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_BASE64DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class HexEncode : public Transformation {
public:
explicit HexEncode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_BASE64DECODE_H_

View File

@ -0,0 +1,49 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/html_entity_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
HtmlEntityDecode::HtmlEntityDecode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& HtmlEntityDecode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation HtmlEntityDecode
*/
assay->debug(4, "Transformation HtmlEntityDecode is not implemented yet.");
return value;
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class HtmlEntityDecode : public Transformation {
public:
explicit HtmlEntityDecode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/js_decode.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
JsDecode::JsDecode(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& JsDecode::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation JsDecode
*/
assay->debug(4, "Transformation JsDecode is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class JsDecode : public Transformation {
public:
explicit JsDecode(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/length.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
Length::Length(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& Length::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation Length
*/
assay->debug(4, "Transformation Length is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_
#define SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class Length : public Transformation {
public:
explicit Length(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-base64_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-base64_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-base64_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-base64_decode_ext.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-base64_decode_ext.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-base64_decode_ext.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-cmd_line.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-cmd_line.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-cmd_line.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-compress_whitespace.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-compress_whitespace.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-compress_whitespace.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-css_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-css_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-css_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-escape_seq_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-escape_seq_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-escape_seq_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-hex_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-hex_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-hex_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-hex_encode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-hex_encode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-hex_encode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-html_entity_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-html_entity_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-html_entity_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-js_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-js_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-js_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-length.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-length.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-length.o'

Binary file not shown.

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-lowercase.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-lowercase.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-lowercase.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-md5.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-md5.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-md5.o'

Binary file not shown.

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-none.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-none.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-none.o'

Binary file not shown.

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-normalise_path.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-normalise_path.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-normalise_path.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-normalise_path_win.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-normalise_path_win.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-normalise_path_win.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-parity_even_7bit.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-parity_even_7bit.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-parity_even_7bit.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-parity_odd_7bit.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-parity_odd_7bit.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-parity_odd_7bit.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-parity_zero_7bit.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-parity_zero_7bit.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-parity_zero_7bit.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-remove_comments.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-remove_comments.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-remove_comments.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-remove_comments_char.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-remove_comments_char.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-remove_comments_char.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-remove_nulls.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-remove_nulls.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-remove_nulls.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-remove_whitespace.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-remove_whitespace.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-remove_whitespace.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-replace_comments.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-replace_comments.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-replace_comments.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-replace_nulls.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-replace_nulls.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-replace_nulls.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-sha1.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-sha1.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-sha1.o'

Binary file not shown.

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-sql_hex_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-sql_hex_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-sql_hex_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-transformation.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-transformation.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-transformation.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-trim.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-trim.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-trim.o'

Binary file not shown.

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-trim_left.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-trim_left.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-trim_left.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-trim_right.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-trim_right.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-trim_right.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-url_decode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-url_decode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-url_decode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-url_decode_uni.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-url_decode_uni.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-url_decode_uni.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-url_encode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-url_encode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-url_encode.o'

View File

@ -0,0 +1,12 @@
# actions/transformations/libmodsecurity_la-utf8_to_unicode.lo - a libtool object file
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.11
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# Name of the PIC object.
pic_object='.libs/libmodsecurity_la-utf8_to_unicode.o'
# Name of the non-PIC object
non_pic_object='libmodsecurity_la-utf8_to_unicode.o'

View File

@ -0,0 +1,49 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/md5.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
Md5::Md5(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& Md5::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation Md5
*/
assay->debug(4, "Transformation Md5 is not implemented yet.");
return value;
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_MD5_H_
#define SRC_ACTIONS_TRANSFORMATIONS_MD5_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class Md5 : public Transformation {
public:
explicit Md5(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_MD5_H_

View File

@ -0,0 +1,48 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/none.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
None::None(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& None::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation None
*/
assay->debug(4, "Transformation None is not implemented yet.");
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_NONE_H_
#define SRC_ACTIONS_TRANSFORMATIONS_NONE_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class None : public Transformation {
public:
explicit None(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_NONE_H_

View File

@ -0,0 +1,49 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include "actions/transformations/normalise_path.h"
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <cctype>
#include <locale>
#include "modsecurity/assay.h"
#include "actions/transformations/transformation.h"
namespace ModSecurity {
namespace actions {
namespace transformations {
NormalisePath::NormalisePath(std::string action)
: Transformation(action) {
this->action_kind = 1;
}
std::string& NormalisePath::evaluate(std::string value,
Assay *assay) {
/**
* @todo Implement the transformation NormalisePath
*/
assay->debug(4, "Transformation NormalisePath is not implemented yet.");
return value;
}
} // namespace transformations
} // namespace actions
} // namespace ModSecurity

View File

@ -0,0 +1,44 @@
/**
* ModSecurity, http://www.modsecurity.org/
* Copyright (c) 2015 Trustwave Holdings, Inc. (http://www.trustwave.com/)
*
* You may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* If any of the files related to licensing are missing or if you have any
* other questions related to licensing please contact Trustwave Holdings, Inc.
* directly using the email address security@modsecurity.org.
*
*/
#include <string>
#include "actions/action.h"
#include "actions/transformations/transformation.h"
#ifndef SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_
#define SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_
#ifdef __cplusplus
namespace ModSecurity {
class Assay;
namespace actions {
namespace transformations {
class NormalisePath : public Transformation {
public:
explicit NormalisePath(std::string action);
std::string& evaluate(std::string exp,
Assay *assay) override;
};
} // namespace transformations
} // namespace actions
} // namespace ModSecurity
#endif
#endif // SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_

Some files were not shown because too many files have changed in this diff Show More