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

Validation issue and routing issue #782

Closed
maczdata opened this issue Oct 17, 2017 · 7 comments
Closed

Validation issue and routing issue #782

maczdata opened this issue Oct 17, 2017 · 7 comments

Comments

@maczdata
Copy link

notice querystring like "jobs/type?[]=" does not work and also the validation library does not validate array input like "job[owner]"

@lonnieezell
Copy link
Member

Please provide more details about how you're trying to use them. I'll have to dig into code later, but square brackets are typically considered unsafe within a uri. Here's a good article explaining it with links to the original RFC.

Validation - you might be right. I thought we had that in there, but I don't see any tests in place for that. Will have to check on that.

@maczdata
Copy link
Author

for the square bracks, i want to pass an array of values from a get request using check boxes, which is to be used in the controller.
when the form is submitted, a get a blank page with and error title, no debug trace inclusive, and the toolbar becomes unresponsive.

@maczdata
Copy link
Author

maczdata commented Oct 17, 2017

what if the square brackets is encoded or escaped, does it make it safe to use??

@lonnieezell
Copy link
Member

yes, encoding makes it safe. The URI class should take care of that for you, I believe. Another option is to use a comma-separated list and turn it into an array elsewhere.

@maczdata
Copy link
Author

not familiar with doing a comma separated list, mind giving a head start on that??

@lonnieezell
Copy link
Member

I'm assuming you're building the URI through javascript, so you build a URI out of the selected options something like jobs/type?options=developer,designer.

Looking back on your actual issue, though - what was the actual error generated? You might need to check logs for it.

@maczdata
Copy link
Author

No JavaScript included, and it does not return anything in the log.

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

No branches or pull requests

2 participants