Giter Site home page Giter Site logo

Code Injection about cmlyst HOT 4 CLOSED

Light-Wizzard avatar Light-Wizzard commented on August 18, 2024
Code Injection

from cmlyst.

Comments (4)

dantti avatar dantti commented on August 18, 2024

In themes/default/base.html you have {{cms_head}} and {{cms_foot}} that is replaced by the HTML code you fill in that option

from cmlyst.

Light-Wizzard avatar Light-Wizzard commented on August 18, 2024

This should not be closed; its an Issue: to duplicate this issue; put code in both header and footer;
I used this for my test:
CMS Header

<style> body { background-color: lightblue; } </style>

CMS Footer

<style> body { background-color: white; } </style>

I would expect to see a white background and not a lightblue one; since the Footer in the footer will change it; but I see the same body css as is in the header, its duplicated the two.

I did find the references to {{cms_head}} and {{cms_foot}} in the base.html template; and adminsettings.cpp and root.cpp
where on line 98 I see this:
const QString cms_foot = settings.value(QStringLiteral("cms_head")); if (!cms_foot.isEmpty()) { const Grantlee::SafeString safe(cms_foot, true); c->setStash(QStringLiteral("cms_foot"), QVariant::fromValue(safe)); }
which should be this:

const QString cms_foot = settings.value(QStringLiteral("cms_foot"));

and at line 283

const QString cms_foot = settings.value(QStringLiteral("cms_head"));

same thing:

const QString cms_foot = settings.value(QStringLiteral("cms_foot"));

I need to learn how to do pushes; I will work on getting this into my github.

from cmlyst.

dantti avatar dantti commented on August 18, 2024

Sorry I didn't understand you had an issue, I thought you didn't understand how that worked.

from cmlyst.

Light-Wizzard avatar Light-Wizzard commented on August 18, 2024

My bad; I was looking at the code and did not find an issue the first time; I had to debug it to find it; I knew it was an error or my misunderstanding about how the code should work; I learned how to do a pull request.

from cmlyst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.