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

UI: More carefully select acceptable client side values in Select-Field #1203

Merged
merged 2 commits into from
Oct 4, 2018

Conversation

klees
Copy link
Member

@klees klees commented Oct 4, 2018

The current implementation of the Select Field allows the clients to pass a rather broad set of values (all strings). This is not correct, as only keys of known options will ever be retrieved from a benign client. This PR restricts the acceptable client values accordingly and tests the behaviour.

klees added 2 commits October 4, 2018 15:00
If a select is not required, also an empty string is a valid option.
@klees
Copy link
Member Author

klees commented Oct 4, 2018

Wow, that was fast =)

@chfsx
Copy link
Member

chfsx commented Oct 4, 2018

=) I did not run the tests (since Travis will do that) but isClientSideValueOk($value) seems right! I has something similar in the TagInput

Copy link
Contributor

@Amstutz Amstutz left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@Amstutz
Copy link
Contributor

Amstutz commented Oct 4, 2018

To me this is not an implicit change of the interface of this component. Your change is directly derived from the components definition, therefore we do not need any change of the description of the component and may merge directly. @klees do you agree? If so, ill merge.

@klees
Copy link
Member Author

klees commented Oct 4, 2018

Yes, I agree.

@Amstutz Amstutz merged commit 942ba61 into ILIAS-eLearning:trunk Oct 4, 2018
@klees klees deleted the trunk_select_sec branch October 8, 2018 13:47
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.

3 participants