Skip to content

[FIX] Searching by undefined via REST when using query param#11657

Merged
sampaiodiego merged 2 commits intodevelopfrom
fix-rest-users-list
Aug 20, 2018
Merged

[FIX] Searching by undefined via REST when using query param#11657
sampaiodiego merged 2 commits intodevelopfrom
fix-rest-users-list

Conversation

@MarcosSpessatto
Copy link
Copy Markdown
Contributor

@MarcosSpessatto MarcosSpessatto commented Aug 2, 2018

Closes #11636
Closes #11599
Closes #11760

Initializing query object(parseJsonQuery) with an empty object to avoid searches by undefined
@MarcosSpessatto MarcosSpessatto added this to the 0.69.0 milestone Aug 2, 2018
@MarcosSpessatto MarcosSpessatto self-assigned this Aug 2, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-11657 August 2, 2018 13:02 Inactive
}

let query;
let query = {};
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.

with this change I guess the test on line 58 isn't required anymore, right?

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.

Wrong, since JSON.parse('false'); can generate query = false;

@sampaiodiego sampaiodiego changed the title [FIX] Initializing query object(parseJsonQuery) with an empty object to avoid searches by undefined [FIX] Searching by undefined via REST when using query param Aug 20, 2018
@sampaiodiego sampaiodiego changed the title [FIX] Searching by undefined via REST when using query param [FIX] Searching by undefined via REST when using query param Aug 20, 2018
@sampaiodiego sampaiodiego merged commit 809055b into develop Aug 20, 2018
@sampaiodiego sampaiodiego deleted the fix-rest-users-list branch August 20, 2018 20:23
@sampaiodiego sampaiodiego mentioned this pull request Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants