matcornic / matcornic/hugo-theme-learn
search.js can lock up browser when parsing certain data
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Similar to #314.
I found that when the index includes a large amount of contiguous text, in our case it was a base64 encoded TLS certificate string, then the regex here can cause a lock up:
I found this using both chrome and Firefox
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at static/js/search.js line 74, linked in the issue, and compare the behavior with the related issue #314. Reproduce the problem using an index containing a large contiguous text value such as a base64-encoded TLS certificate, then check in Chrome and Firefox that parsing no longer locks up the browser.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100