Skip to content

Commit

Permalink
Merge pull request #1831 from akto-api-security/log_insertion_check
Browse files Browse the repository at this point in the history
add account check
  • Loading branch information
ayushaga14 authored Dec 16, 2024
2 parents bf4ab12 + e98ecac commit efee9c4
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,10 @@ public String createCollectionForHost() {

public String insertRuntimeLog() {
try {
int accId = Context.accountId.get();
if (accId == 1733164172) {
return Action.SUCCESS.toUpperCase();
}
Log dbLog = new Log(log.getString("log"), log.getString("key"), log.getInt("timestamp"));
DbLayer.insertRuntimeLog(dbLog);
} catch (Exception e) {
Expand All @@ -1239,6 +1243,10 @@ public String insertRuntimeLog() {

public String insertAnalyserLog() {
try {
int accId = Context.accountId.get();
if (accId == 1733164172) {
return Action.SUCCESS.toUpperCase();
}
Log dbLog = new Log(log.getString("log"), log.getString("key"), log.getInt("timestamp"));
DbLayer.insertAnalyserLog(dbLog);
} catch (Exception e) {
Expand Down Expand Up @@ -1921,6 +1929,10 @@ public String modifyHybridTestingSetting() {

public String insertTestingLog() {
try {
int accId = Context.accountId.get();
if (accId == 1733164172) {
return Action.SUCCESS.toUpperCase();
}
Log dbLog = new Log(log.getString("log"), log.getString("key"), log.getInt("timestamp"));

// Skip writing cyborg call logs.
Expand Down

0 comments on commit efee9c4

Please sign in to comment.