Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

security: finish fixing unsafe heading regex #1226

Closed
wants to merge 9 commits into from

Commits on Apr 26, 2018

  1. security: finish fixing unsafe heading regex

    Apply similar patch to a similar heading regex.
    Follow-on to f052a2c.
    
    Test: Add a test case to demonstrate the slower blow-up.
    davisjam committed Apr 26, 2018
    Configuration menu
    Copy the full SHA
    0e07a9f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    990b452 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5736014 View commit details
    Browse the repository at this point in the history
  4. make header up to spec

    UziTech authored and davisjam committed Apr 26, 2018
    Configuration menu
    Copy the full SHA
    943d995 View commit details
    Browse the repository at this point in the history
  5. security: replace unsafe /X+$/ idiom with rtrim

    Problem:
    replace(/X+$/, '') is vulnerable to REDOS
    
    Solution:
    Replace all instances I could find with a custom rtrim
    davisjam committed Apr 26, 2018
    Configuration menu
    Copy the full SHA
    0cfe39e View commit details
    Browse the repository at this point in the history
  6. WIP: safening the ILG text regex

    Help wanted.
    davisjam committed Apr 26, 2018
    Configuration menu
    Copy the full SHA
    29be5f5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4d5cfc7 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2018

  1. remove leading whitespace in paragraphs

    Spec:
    No leading whitespace within a paragraph
    
    Fix:
    I strip leading whitespace on each line while rendering paragraphs
    
    Unanticipated problem:
    Causes the (previously failing but hidden) CommonMark 318 to fail.
    I added that to the list of expected-to-fail tests.
    
    This commit addresses a failing header test case noted in 943d995
    whose root cause was paragraph rendering not up to spec.
    davisjam committed Apr 27, 2018
    Configuration menu
    Copy the full SHA
    dd26af8 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2018

  1. WIP: safen the text regex via linear-time scans

    Sketch implementing text regex as a linear-time RegExp imitator.
    - A few nits here and there
    - I haven't tested all of the offsetOfX routines, so 'npm run test' hangs on some bug
    davisjam committed Apr 28, 2018
    Configuration menu
    Copy the full SHA
    24d4a5e View commit details
    Browse the repository at this point in the history