#6 Set of corrections for script processing basics
Merged by quidam. Opened by quidam.
quidam/librejs base_fixes  into  master

Download 6.patch

The changes correct problems with fetching and parsing scripts and fix domain-level whitelisting. Please give it a thorough review, some of the changes may be preferably done some other ways, and I don't know the code that well yet.

16 new commits added

  • Add basic time profiling to dbg_print
  • Made less verbose when debug is off
  • Correct hack that prevents parsing non-html documents. Still needs work.
  • Do not process non-javascript scripts (json, templates, etc)
  • Check global license and add to popup. Prevent parsing inline scripts if there is a global license.
  • Refactor whitelisting at read_script()
  • Correct tab and badge initialization to prevent race conditions
  • Prevent evaluation of external scripts, as they are always nontrivial
  • Generalize comment styles for @license matching at license_read(), and avoid parsing empty whitespace sections
  • Enable legacy license matching and hash whitelist matching at license_read()
  • Generalize gpl-3.0 license text
  • Generalize comment styles for @license matching
  • Make legacy_license_check return the matched license name. Also improved logging.
  • Set dbg_print() on main_panel.js and clean default output
  • Regexp matches at stripLicenseToRegexp should be non-global
  • Disable whitelisted and blacklisted sections on display panel for now

1 new commit added

  • Bumped version number to 7.14

Not the best thing to merge my own request, but Nathan is busy these days and the issues being resolved are urgent.

Pull-Request has been merged by quidam

Metadata