Giter Club home page Giter Club logo

Comments (11)

Schepp avatar Schepp commented on June 4, 2024

I saw your file check already (albeit it throwed an error here as not everybody has finfo available ;)

It is true that you can do a path traversal on the one hand, but it is also true that Booster did already do a filename-check to ensure to include only .css and .js files. Also file names were filtered before being processed. So you can't do that much damage in my opinion. If I am wrong you must show me how! :D

from css-js-booster.

vvo avatar vvo commented on June 4, 2024

It was very easy, i typed this in my url bar :
http://domain.net/CSS-JS-Booster/booster/booster_css.php?dir=../../hello.php,../../static/css/yui,../../static/css/library,../../static/css/template&cachedir=booster_cache&css_hosted_minifier=1&totalparts=1&part=1&nocache=0

and there i had the php file (do not remember if id did it with css.php or js.php)

just watched the code very fast, doesn't the check only occurs when dealing with directories ?

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

Nope, it should always do the check from what I know.
I was very aware of the potential risk of not checking twice what files are being requested, that's why I had have the check everywhere. See for example here in line 468 ff.:

http://github.com/Schepp/CSS-JS-Booster/blob/master/booster/booster_inc.php

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

Okay, sorry, I think you may be right for the check being ommited on single files. I also just did a quick scan of my code. Will dig deeper and then include the check there too if it is really missing. Shouldn't be missing.

from css-js-booster.

vvo avatar vvo commented on June 4, 2024

Getfiles is only called when css.php is called with dir=actual/dir and not dir=actualfile.php

right ?

ps: i double checked and the == $type is only called in getfiles wich is only called on directories

good luck

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

You are completely right. But you also already put in place is_css and is_js, so they will now do a good job then. BTW: I will push an improved Booster this week, with a lot of changes (also including your improvements), so don't develop too much at the moment as merging may get difficult then :)

from css-js-booster.

vvo avatar vvo commented on June 4, 2024

ARGH ! i hope the merge will not be too difficult ... you couldn't get my changes then move them / modify them and repush ?

if you do all your changes by hand outside github it's a lot more difficult but i'll handle it .. :)

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

I have most of your changes here (I did a pull two days ago).
But I still need an hour or two of work on the library before pushing it to the public. Don't want to have something broken online.

from css-js-booster.

vvo avatar vvo commented on June 4, 2024

No Problem, also i just saw i had double new finfo on is_css and is_js on my branch

good work ! see you

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

Thanks! Good work from you, too!
I drop you an info as soon as I do the push.

from css-js-booster.

Schepp avatar Schepp commented on June 4, 2024

Fixed

from css-js-booster.

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.