Skip to content

Commit

Permalink
Simplify the interface of manifest check
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbubble committed Oct 13, 2022
1 parent ed8c571 commit 25d5ae8
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ import java.util.zip.ZipFile
import kotlin.system.exitProcess

interface ManifestVulnerability {
fun checkDebugOrBackup(app: IAndroidApplication)
fun checkProviderMisConfigPath(aXmlNode: AXmlNode, isExported: Boolean, xmlInfo: ComponentDescription)
fun check(manifest: ProcessManifest)
}

/**
Expand Down Expand Up @@ -314,7 +313,7 @@ object AndroidUtils {
layoutFileParser!!.parseLayoutFileDirect(apkPath)
parseAllComponents(manifest)

this.manifestVulnerability?.checkDebugOrBackup(manifest.application)
this.manifestVulnerability?.check(manifest)
isApkParsed = true

}
Expand Down Expand Up @@ -588,9 +587,6 @@ object AndroidUtils {
unExportComponents.add(sc)
xmlInfo.exported = false
}
if (type == "Providers") {
this.manifestVulnerability?.checkProviderMisConfigPath(aXmlNode, isExportedCompo, xmlInfo)
}
if (!compoXmlMapByType.containsKey(compoKey)) {
compoXmlMapByType[compoKey] = HashMap()
}
Expand Down

0 comments on commit 25d5ae8

Please sign in to comment.