File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,6 +244,7 @@ export class Config {
244244 public static port : number = parseInt ( Config . getEnv ( "port" , "3000" ) ) ;
245245 public static domain : string = Config . getEnv ( "domain" , "localhost" ) ; // sent to website and used in baseurl()
246246 public static cookie_secret : string = Config . getEnv ( "cookie_secret" , "NLgUIsozJaxO38ze0WuHthfj2eb1eIEu" ) ; // Used to protect cookies
247+ public static max_ace_count : number = parseInt ( Config . getEnv ( "max_ace_count" , "128" ) , 10 ) ;
247248
248249 public static amqp_reply_expiration : number = parseInt ( Config . getEnv ( "amqp_reply_expiration" , ( 60 * 1000 ) . toString ( ) ) ) ; // 1 min
249250 public static amqp_force_queue_prefix : boolean = Config . parseBoolean ( Config . getEnv ( "amqp_force_queue_prefix" , "false" ) ) ;
Original file line number Diff line number Diff line change @@ -226,6 +226,11 @@ export class DatabaseConnection {
226226 async CleanACL < T extends Base > ( item : T , user : TokenUser , parent : Span ) : Promise < T > {
227227 const span : Span = Logger . otel . startSubSpan ( "db.CleanACL" , parent ) ;
228228 try {
229+ if ( item . _acl . length > Config . max_ace_count ) {
230+ // remove excesive acls
231+ const newacl = item . _acl . slice ( 0 , Config . max_ace_count ) ;
232+ item . _acl = newacl ;
233+ }
229234 for ( let i = item . _acl . length - 1 ; i >= 0 ; i -- ) {
230235 {
231236 const ace = item . _acl [ i ] ;
You can’t perform that action at this time.
0 commit comments