Skip to content

Commit

Permalink
Crash fix
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jan 9, 2024
1 parent 71e2cd9 commit 8bdbf53
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Refer to the documentation site to learn more about the commands.
- JavaScript
- TypeScript
- Python
- PHP (Requires PHP >= 7.0. Supports PHP 5.2 to 8.3)
## Troubleshooing
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "chen"
ThisBuild / organization := "io.appthreat"
ThisBuild / version := "1.1.3"
ThisBuild / version := "1.1.4"
ThisBuild / scalaVersion := "3.3.1"

val cpgVersion = "1.4.22"
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"downloadUrl": "https://github.com/AppThreat/chen",
"issueTracker": "https://github.com/AppThreat/chen/issues",
"name": "chen",
"version": "1.1.3",
"version": "1.1.4",
"description": "Code Hierarchy Exploration Net (chen) is an advanced exploration toolkit for your application source code and its dependency hierarchy.",
"applicationCategory": "code-analysis",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "1.1.3" %}
{% set version = "1.1.4" %}

package:
name: chen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PhpParser private (phpParserPath: String, phpIniPath: String):
private val logger = LoggerFactory.getLogger(this.getClass)

private def phpParseCommand(filename: String): String =
val phpParserCommands = "--with-recovery --resolve-names -c --json-dump"
val phpParserCommands = "--with-recovery --resolve-names -P --json-dump"
phpParserPath match
case "phpastgen" =>
s"$phpParserPath $phpParserCommands $filename"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class DynamicCallLinker(cpg: Cpg) extends CpgPass(cpg):
.fullNameExact(allSuperClasses(typeDeclFullName).toIndexedSeq*)
.astChildren
.isMethod
.name(call.name)
.nameExact(call.name)
.and(_.signatureExact(signature))
.fullName
.l
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class ChennaiTagsPass(atom: Cpg) extends CpgPass(atom):
".*def\\s(get|post|put)\\(.*"
)
private val PHP_ROUTES_METHODS_REGEXES = Array(
".*(router|routes)->(add|before|mount|get|post|put|delete|head|option).*"
".*(router|routes|r|app|map)->(addRoute|add|before|mount|get|post|put|delete|head|option).*",
".*(Router)::(scope|connect|get|post|put|delete|head|option).*"
)
private val HTTP_METHODS_REGEX = ".*(request|session)\\.(args|get|post|put|form).*"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "appthreat-chen"
version = "1.1.3"
version = "1.1.4"
description = "Code Hierarchy Exploration Net (chen)"
authors = ["Team AppThreat <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 8bdbf53

Please sign in to comment.