mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-10 14:04:35 -04:00
never allow any js that takes longer than 5 seconds to run.
This commit is contained in:
parent
eb956a909f
commit
6ebc2dcf5c
1 changed files with 2 additions and 1 deletions
|
@ -46,7 +46,8 @@ module PrettyText
|
|||
end
|
||||
|
||||
def self.create_new_context
|
||||
ctx = V8::Context.new
|
||||
# timeout any eval that takes longer that 5 seconds
|
||||
ctx = V8::Context.new(timeout: 5000)
|
||||
|
||||
ctx["helpers"] = Helpers.new
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue