Skip to content

Strage creates error when user make note written in specific character #300

@nishimuuu

Description

@nishimuuu

Hi, Boostnote is very nice noteapp for me!

When I wrote testcase for SQL injection then I found a bug like that,

a note that causes parsing error

(3 single quote and 2 CRLF)

'''


console.error log

main.js:3 d100622a648e77679d29.cson(anonymous function) @ main.js:3o @ main.js:3(anonymous function) @ main.js:30
/Applications/Boostnote.app/Contents/Resources/app/node_modules/coffee-script/lib/coffee-script/hel…:188 Uncaught (in promise) SyntaxError: missing '''

Why this error happen?

This bug is from parsing cson file because
when User writes 3 single quote and newline character, cson file Boostnote created is like here

type: "MARKDOWN_NOTE"
folder: "2822f41e450686c2d402"
title: "''''"
content: '''
  \''''
  
  
'''
tags: []
isStarred: false
createdAt: "2017-02-21T09:55:48.460Z"
updatedAt: "2017-02-21T09:56:44.119Z"

Best regards
@nishimuuu

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Issue concerns a bug.funded on issuehunt 💵Issue has received funding that will be rewarded to the contributor solving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions