mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Refactor android:backupAllowed query
Refactor the query to check for the nonexistence of the `android:allowBackup` attribute being set to false. The default value is true, so we need to check for it being explicitly marked false.
This commit is contained in:
@@ -79,8 +79,6 @@ class AndroidApplicationXmlElement extends XmlElement {
|
||||
* https://developer.android.com/guide/topics/data/autobackup
|
||||
*/
|
||||
predicate allowsBackup() {
|
||||
// The default value for the attribute `android:allowBackup` is `true`.
|
||||
// Therefore we also check if it is not present.
|
||||
not exists(AndroidXmlAttribute attr |
|
||||
this.getAnAttribute() = attr and
|
||||
attr.getName() = "allowBackup" and
|
||||
|
||||
Reference in New Issue
Block a user