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

Some string values such as "_nil_" have special meaning #1484

Closed
niemeyer opened this issue Sep 18, 2017 · 3 comments
Closed

Some string values such as "_nil_" have special meaning #1484

niemeyer opened this issue Sep 18, 2017 · 3 comments
Assignees
Milestone

Comments

@niemeyer
Copy link

niemeyer commented Sep 18, 2017

As discovered via #1477, some strings may have special meaning to the server, which is usually a very bad idea as it mixes user data with implementation logic in unexpected ways. A string such as _nil_ for example might very easily be part of the data imported into the system, and it would magically disappear once stored.

As a recommendation, I would make SetValueString in the Go code respect the input value exactly. Even escaping should be applied internally, instead of expecting developers to escape the value by themselves. If the low-level functionality is necessary for certain tools, I would make that explicit in the API name, such as SetValueRaw or similar, and make the rules there more clear so people can tell what to expect when using it.

@pawanrawal pawanrawal added this to the v0.8.3 milestone Sep 18, 2017
@pawanrawal
Copy link
Contributor

Thats a good point @niemeyer. I will do a proper fix for this soon.

@pawanrawal pawanrawal self-assigned this Sep 26, 2017
@peterstace peterstace changed the title Some string values have special meaning Some string values such as "_nil_" have special meaning Oct 4, 2017
@pawanrawal pawanrawal modified the milestones: v0.8.3, v0.8.4 Oct 9, 2017
@peterstace
Copy link

I've made some changed in a branch fix_nil_string that I created while working on #1627 . They might be useful when we work on this. It will probably be easier to work on this issue once the client/transaction work has been finished -- since handling empty strings will be easier when we no longer delete an edge by not setting the object (i.e leave it as an empty string).

@pawanrawal
Copy link
Contributor

A fix was merging with 56c99ea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants