Skip to content

Commit

Permalink
fix: authentication bug possible because of this code block
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0elliot committed Apr 10, 2024
1 parent 28f2b2f commit 1cf783f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions db-connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -7473,7 +7473,7 @@ func SetWorkflowAppAuthDatastore(ctx context.Context, workflowappauth AppAuthent
workflowappauth.Edited = timeNow
workflowappauth.App.Actions = []WorkflowAppAction{}

if len(workflowappauth.Fields) > 20 {
if len(workflowappauth.Fields) > 500 {
//log.Printf("[WARNING][%s] Too many fields for app auth: %d", id, len(workflowappauth.Fields))
newfields := []AuthenticationStore{}

Expand Down Expand Up @@ -12053,7 +12053,7 @@ func DeleteDbIndex(ctx context.Context, index string) error {

log.Printf("[WARNING] Deleting index %s entirely. This is normal behavior for workflowqueues", index)

// Create a query to retrieve all items in the index
// Create a query to retrieve all items in the index
var err error
query := datastore.NewQuery(index).KeysOnly()
it := project.Dbclient.Run(ctx, query)
Expand Down Expand Up @@ -12083,7 +12083,6 @@ func DeleteDbIndex(ctx context.Context, index string) error {
}
}


// Delete remaining entities
if len(keys) > 0 {
err := project.Dbclient.DeleteMulti(ctx, keys)
Expand All @@ -12092,8 +12091,5 @@ func DeleteDbIndex(ctx context.Context, index string) error {
}
}




return nil
}

0 comments on commit 1cf783f

Please sign in to comment.