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

Issue 4297: 2nd fix for on ADD replication URP issue internal searche… #4439

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

tbordaz
Copy link
Contributor

@tbordaz tbordaz commented Nov 13, 2020

…s with filter containing unescaped chars

Bug description:
Previous fix is buggy because slapi_filter_escape_filter_value returns
a escaped filter component not an escaped assertion value.

Fix description:
use the escaped filter component

relates: #4297

Reviewed by:

Platforms tested: F31

@Firstyear
Copy link
Contributor

Ack from me, @mreynolds389 probably will want to check too.

@tbordaz tbordaz force-pushed the issue_4297_2 branch 2 times, most recently from 0a8c101 to d902883 Compare November 18, 2020 10:14
@mreynolds389
Copy link
Contributor

@tbordaz - have you had a chance to review my comment?

@Firstyear
Copy link
Contributor

@tbordaz - have you had a chance to review my comment?

Which comment? I don't see it ...


char *conflict_csnstr = (char*)slapi_entry_attr_get_ref((Slapi_Entry *)entry, "conflictcsn");
CSN *conflict_csn = csn_new_by_string(conflict_csnstr);
CSN *tombstone_csn = NULL;

char *filter = slapi_filter_sprintf("(&(objectclass=nstombstone)(nscpentrydn=%s))", escaped_basedn);
slapi_ch_free((void **)&escaped_basedn);
char *filter = slapi_filter_sprintf("(&(objectclass=nstombstone)%s)", escaped_filter);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the "%s" be surrounded by ( ) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Mark. This is the magic of slapi_filter_escape_filter_value to add ( ) around the =.
So no better to no surround the "%s" I imagine it could be rejected for invalid filter

…es with filter containing unescaped chars

Bug description:
	Previous fix is buggy because slapi_filter_escape_filter_value returns
        a escaped filter component not an escaped assertion value.

Fix description:
	use the escaped filter component

relates: 389ds#4297

Reviewed by: William Brown

Platforms tested: F31
@tbordaz tbordaz merged commit c87084d into 389ds:master Nov 25, 2020
tbordaz added a commit that referenced this pull request Nov 25, 2020
…es with filter containing unescaped chars (#4439)

Bug description:
	Previous fix is buggy because slapi_filter_escape_filter_value returns
        a escaped filter component not an escaped assertion value.

Fix description:
	use the escaped filter component

relates: #4297

Reviewed by: William Brown

Platforms tested: F31
tbordaz added a commit that referenced this pull request Nov 25, 2020
…es with filter containing unescaped chars (#4439)

Bug description:
	Previous fix is buggy because slapi_filter_escape_filter_value returns
        a escaped filter component not an escaped assertion value.

Fix description:
	use the escaped filter component

relates: #4297

Reviewed by: William Brown

Platforms tested: F31
tbordaz added a commit that referenced this pull request Nov 25, 2020
…es with filter containing unescaped chars (#4439)

Bug description:
	Previous fix is buggy because slapi_filter_escape_filter_value returns
        a escaped filter component not an escaped assertion value.

Fix description:
	use the escaped filter component

relates: #4297

Reviewed by: William Brown

Platforms tested: F31
tbordaz added a commit to tbordaz/389-ds-base that referenced this pull request Nov 26, 2020
…es with filter containing unescaped chars (389ds#4439)

Bug description:
	Previous fix is buggy because slapi_filter_escape_filter_value returns
        a escaped filter component not an escaped assertion value.

Fix description:
	use the escaped filter component

relates: 389ds#4297

Reviewed by: William Brown

Platforms tested: F31
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.

None yet

3 participants