Skip to content

Fix for #127, 'escape' the selectorName#128

Merged
dbu merged 1 commit intophpcr:masterfrom
wjzijderveld:issue-127
Jan 22, 2014
Merged

Fix for #127, 'escape' the selectorName#128
dbu merged 1 commit intophpcr:masterfrom
wjzijderveld:issue-127

Conversation

@wjzijderveld
Copy link
Copy Markdown

Need to escape selectorNames with specials tokens in it.
Jackalope Doctrine DBAL seems happy with this change.

@dbu
Copy link
Copy Markdown
Member

dbu commented Jan 22, 2014

should we be worried that jackalope-doctrine-dbal did work even without this fix? it would let people write invalid things and then be confused when trying to switch to jackalope-jackrabbit. should we open an issue on jackalope-doctrine-dbal to refuse names that are not escaped?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the - is a special character too? did you test that with jackrabbit?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, when I ran the tests locally it errored over this query as well.

@wjzijderveld
Copy link
Copy Markdown
Author

Not sure, I couldn't actually find a list with special tokens for this. In JSR-283 they don't mention the brackets for every operand.
And if it is a problem, the problem probably is in phpcr-utils, in the Sql2QomQueryConverter.

dbu added a commit that referenced this pull request Jan 22, 2014
Fix for #127, 'escape' the selectorName
@dbu dbu merged commit 443c545 into phpcr:master Jan 22, 2014
@dbu
Copy link
Copy Markdown
Member

dbu commented Jan 22, 2014

created phpcr/phpcr-utils#101

@dbu
Copy link
Copy Markdown
Member

dbu commented Jan 22, 2014

thanks a lot @wjzijderveld !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants