Problem
The main configuration form is looking for Bynder domains under getbynder.com only, this doesn't always happen.
Also, the Oauth token validation is only accepting 32 char long tokens when at least 40 char long should be accepted as well.
Proposed resolution
Change the validateForm function to accept all the necessary values.
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | interdiff.txt | 4.19 KB | slashrsm |
| #15 | 2862587_15.patch | 5.84 KB | slashrsm |
| #13 | bynder-config-form-validation-fix-2862587-11.patch | 2.57 KB | slashrsm |
| #11 | bynder-config-form-validation-fix-2862587-11.patch | 2.57 KB | jfs.csantos |
| #6 | bynder-config-form-validation-fix-2862587-6.patch | 1.74 KB | jfs.csantos |
Comments
Comment #2
Bynder commentedRemoved validation for Bynder domain names and for token character length as they are not fixed formats.
Comment #3
jfs.csantos commentedComment #4
jfs.csantos commentedComment #5
slashrsm commentedShouldn't we leave this check and just allow longer strings?
I think that we should still check if the provided string is a valid domain.
Comment #6
jfs.csantos commentedI'll leave the check for alphanumeric , the length one is kind of irrelevant because we can have either 23 or 40 char tokens live, and one test environments they can be even simpler. As long as it's a required field it should be fine, if we change the token formats in the future we can update the validation as well.
Changed the domain validation to check for url.
Comment #7
jfs.csantos commentedComment #8
slashrsm commentedPatch in #6 is missing the description change from #2. I think that we'll also need to update \Drupal\Tests\bynder\FunctionalJavascript\ConfigurationFormTest.
Comment #9
slashrsm commentedComment #10
slashrsm commentedComment #11
jfs.csantos commentedUpdated patch #6 descriptions.
Comment #12
jfs.csantos commentedComment #13
slashrsm commentedRe-uploading the patch. Hoping that tesbot will grab it.
Comment #15
slashrsm commentedLet's see if this fixes the tests.
Comment #17
slashrsm commentedCommitted.