File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ class Settings:
48
48
max_size : int = 100
49
49
50
50
def __post_init__ (self ):
51
+ self .max_size = min (10000 , self .max_size ) # Prevent DDoS attacks by limiting the size of the graph
51
52
if not self .no_defaults :
52
53
self .ignore_edges = [graph_api_capnp .EdgeClassification .schema .enumerants ['constOpaqueDef' ]]
53
54
label = graph_api_capnp .Graph .Node .Label
Original file line number Diff line number Diff line change 180
180
< div class ="field ">
181
181
< div class ="ui grid ">
182
182
< div class ="five wide column ">
183
- < input type ="number " id ="max_size " name ="max_size " min ="1 "
183
+ < input type ="number " id ="max_size " name ="max_size " min ="1 " max =" 10000 "
184
184
style ="width:5.5rem " value ="{{ settings.max_size }} ">
185
185
</ div >
186
186
< div class ="eleven wide column middle aligned ">
You can’t perform that action at this time.
0 commit comments