Code Monkey home page Code Monkey logo

creole's People

Contributors

ktdreyer avatar larsch avatar minad avatar tbuehlmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

creole's Issues

Add syntax for image size

I think we should add support for:
{{image.jpg?50x100}}
{{image.jpg?50%|alternate text}}

With regex looking like this:
/\A{{\s_(.?)(?(\d+x\d+|\d+%))?\s(|\s_(.?)\s)?}}/

I can't make a PR right now, maybe next month.

License

Is there a legal license to go along with this gem?

Table parsing is vulnerable to a ReDOS attack

Hi there! I'm a member of GitHub's coding team and I was recently reviewing a report that certain maliciously crafted strings can cause the creole gem to take a long time to render by forcing the gem to spend exponential time matching strings to regular expressions.

Example:

irb(main):006:0> Benchmark.measure { Creole.creolize("|{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{}}}}{{{{~") }
=> #<Benchmark::Tms:0x00007f9cd7792220 @label="", @real=7.256839563999165, @cstime=0.0, @cutime=0.0, @stime=0.0, @utime=7.256716999999998, @total=7.256716999999998>

The impact for us is not huge (we limit the amount of time spent rendering) but just wanted to pass this info along!

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.