Skip to content
Permalink
Browse files Browse the repository at this point in the history
Merge pull request #363 from commenthol/safe-regex
regexes update
  • Loading branch information
commenthol committed Dec 14, 2018
2 parents 4e97f11 + 5290cd1 commit 156f7e1
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 210 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
@@ -1,14 +1,13 @@
sudo: false
language: node_js
node_js:
- 4
- 6
- 8
- 10
- node

script:
- "npm test"

notifications:
irc: "chat.freenode.net#ua-parser"

7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -10,9 +10,10 @@ Contributing to the project, especially `regexes.yaml`, is both welcomed and enc
* `tests/test_device.yaml`
* `tests/test_os.yaml`
* `tests/test_ua.yaml`
5. Push your branch to GitHub and submit a pull request
6. Monitor the pull request to make sure the Travis build succeeds. If it fails simply make the necessary changes to your branch and push it. Travis will re-test the changes.
5. Check that your regex is not vulnerable to [ReDoS](https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS) using the test in `tests/regexes.js`
6. Push your branch to GitHub and submit a pull request
7. Monitor the pull request to make sure the Travis build succeeds. If it fails simply make the necessary changes to your branch and push it. Travis will re-test the changes.

That's it. If you don't feel comfortable forking the project or modifying the YAML you can also [submit an issue](https://github.com/ua-parser/uap-core/issues) that includes the appropriate user agent string and the expected results of parsing.

Thanks!
Thanks!
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -25,11 +25,12 @@
}
],
"devDependencies": {
"yamlparser": ">=0.0.2",
"mocha": "*",
"uap-ref-impl": "ua-parser/uap-ref-impl"
"safe-regex": "^2.0.1",
"uap-ref-impl": "git+https://github.com/ua-parser/uap-ref-impl#master",
"yamlparser": ">=0.0.2"
},
"scripts": {
"test": "mocha -u tdd -R min ./tests/test.js"
"test": "mocha --opts ./tests/mocha.opts ./tests"
}
}

0 comments on commit 156f7e1

Please sign in to comment.