-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Protect the app from importing keys and values that are not supported according to the json scheme #5154
Conversation
@grzesiek2010 is this meant to close #4939? |
Yes, I've just fixed the description. |
settings/src/main/java/org/odk/collect/settings/validation/JsonSchemaSettingsValidator.kt
Outdated
Show resolved
Hide resolved
settings/src/main/java/org/odk/collect/settings/validation/JsonSchemaSettingsValidator.kt
Outdated
Show resolved
Hide resolved
settings/src/main/java/org/odk/collect/settings/validation/JsonSchemaSettingsValidator.kt
Outdated
Show resolved
Hide resolved
settings/src/test/java/org/odk/collect/settings/validation/JsonSchemaSettingsValidatorTest.kt
Outdated
Show resolved
Hide resolved
bb8c721
to
ae797d7
Compare
789baf8
to
fc54c83
Compare
fc54c83
to
1c7e670
Compare
1c7e670
to
550af6c
Compare
Tested with Success! Verified on Android 8.1, 11 Verified cases:
|
Tested with Success! Verified on Android 10 and 12 Today I found one strange issue related to Android 5.1 only: #5178 |
@seadowg there are new changes (for #5176) here so you might want to take a look. In the issue @lognaturel asked if #5176 is a fix for this Crashlytics report. I said that the issue was probably responsible for just a part of the reports. I wanted to propose one additional improvements which is wrapping this into What do you think @seadowg @lognaturel? |
This probably makes sense. I think we'd also want to clear the new shared preferences bucket in the |
I already removed Then in What do you think? |
@grzesiek2010 ah sorry I just realized I was looking at the current |
@seadowg new changes have been added. Please review. |
Closes #5096
Closes #4939
Closes #5176
What has been done to verify that this works as intended?
I've tested the app manually and improved automated tests.
Why is this the best possible solution? Were any other approaches considered?
I've extended
JsonSchemaSettingsValidator
and added methods to verify if existing keys/values are supported.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Please verify the case form the issue #5096
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew checkAll
and confirmed all checks still pass OR confirm CircleCI build passes and run./gradlew connectedDebugAndroidTest
locally.