7 #include <cutelee/exception.h> 8 #include <cutelee/parser.h> 10 #include <Cutelyst/Context> 11 #include <Cutelyst/ParamsMultiMap> 12 #include <Cutelyst/Request> 13 #include <Cutelyst/Response> 15 #ifdef PLUGIN_CSRFPROTECTION_ENABLED 16 #include <Cutelyst/Plugins/CSRFProtection/CSRFProtection> 19 Cutelee::Node *CSRFTag::getNode(
const QString &tagContent, Cutelee::Parser *p)
const 25 CSRF::CSRF(Cutelee::Parser *parser) :
Cutelee::Node(parser)
29 void CSRF::render(Cutelee::OutputStream *stream, Cutelee::Context *gc)
const 31 #ifdef PLUGIN_CSRFPROTECTION_ENABLED 35 const QVariantHash hash = gc->stackHash(0);
36 auto it = hash.constBegin();
37 while (it != hash.constEnd()) {
38 if (it.value().userType() == qMetaTypeId<Cutelyst::Context *>()) {
41 m_cutelystContext = it.key();
57 qWarning(
"%s",
"The CSRF protection plugin has not been built.");
61 #include "moc_csrf.cpp"
static QString getTokenFormField(Context *c)