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

Bug: any kind of slash in a string is a syntax error #245

Closed
2 tasks done
jyooru opened this issue Sep 21, 2022 · 2 comments
Closed
2 tasks done

Bug: any kind of slash in a string is a syntax error #245

jyooru opened this issue Sep 21, 2022 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jyooru
Copy link

jyooru commented Sep 21, 2022

Describe the bug

Any slash in a string causes a syntax error.

{
  "code": 400,
  "details": "Request problems detected",
  "description": "There is a problem with your request. Refer to the documentation for further information.",
  "information": "There was a problem with the database: Parse error on line 1 at character 17 when parsing 'CONTENT {\"a\":\"b\\\\b\"}'"
}

Steps to reproduce

  • occurs when posting JSON data containing a string with a slash in it.
  • occurs when using the CLI SQL REPL
    > surreal sql --conn http://localhost:8000 --user root --pass root --ns test --db test
    > CREATE something CONTENT {"a":"b\\b"}
    {"code":400,"details":"Request problems detected","description":"There is a problem with your request. Refer to the documentation for further information.","information":"There was a problem with the database: Parse error on line 1 at character 17 when parsing 'CONTENT {\"a\":\"b\\\\b\"}'"}
    

Expected behaviour

I expect the following strings to not raise a syntax error:

  • a\\b
  • a\nb

SurrealDB version

surreal 1.0.0-beta.7 for linux on x86_64

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jyooru jyooru added the bug Something isn't working label Sep 21, 2022
@tobiemh
Copy link
Member

tobiemh commented Sep 21, 2022

Thanks @jyooru thanks for this 👏, this is the same bug as #97 and #137 and a fix is coming soon!

This will be going live in v1.0.0-beta.8 really soon.

@jyooru
Copy link
Author

jyooru commented Sep 21, 2022

Awesome, thank you for the very fast response!

@jyooru jyooru closed this as completed Sep 21, 2022
@tobiemh tobiemh added this to the v1.0.0-beta.8 milestone Sep 24, 2022
@tobiemh tobiemh self-assigned this Sep 24, 2022
tobiemh added a commit that referenced this issue Sep 26, 2022
tobiemh added a commit that referenced this issue Sep 26, 2022
Closes #90
Closes #137
Closes #245
Closes #1202
Closes #1212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants