Project

General

Profile

Actions

Bug #15004

closed

Stack overflow error when using invalid JS

Added by Nicolas CHARLES over 5 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Very Small
Priority:
67
Name check:
Fix check:
Regression:

Description

I used this JS expression for motd

"This node is managed by Rudder, it's hostname is ${rudder.node.hostname} and hashing it is "+
rudder.hash.md5(${rudder.node.hostname})

this caused Rudder to shut down, because of

rudder.hash.md5(RDR-TST-RandHost596.rudder.local)' for Variable MOTD - please check method call and/or syntax; ReferenceError: "RDR" is not defined in <eval> at line number 2 <- Error with p
arameters expansion for node 'RDR-TST-RandHost150.rudder.local' (91dc8c60-2174-4f58-8869-ce3314ad7c27): When processing directive 'MOTD and pre-login banner': Invalid script 'evaljs:"This no
de is managed by Rudder, it's hostname is RDR-TST-RandHost150.rudder.local and hashing it is "+
rudder.hash.md5(RDR-TST-RandHost150.rudder.local)' for Variable MOTD - please check method call and/or syntax; ReferenceError: "RDR" is not defined in <eval> at line number 2
[2019-05-31 10:01:58] ERROR net.liftweb.actor.ActorLogger - Actor threw an exception
java.lang.StackOverflowError: null
        at net.liftweb.common.Failure.exceptionChain(Box.scala:971)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)
        at scala.collection.immutable.List.flatMap(List.scala:334)
        at net.liftweb.common.Failure.exceptionChain(Box.scala:978)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)
        at scala.collection.immutable.List.flatMap(List.scala:334)
        at net.liftweb.common.Failure.exceptionChain(Box.scala:978)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)
        at scala.collection.immutable.List.flatMap(List.scala:334)
        at net.liftweb.common.Failure.exceptionChain(Box.scala:978)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)
        at scala.collection.immutable.List.flatMap(List.scala:334)
        at net.liftweb.common.Failure.exceptionChain(Box.scala:978)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)
        at scala.collection.immutable.List.flatMap(List.scala:334)
        at net.liftweb.common.Failure.exceptionChain(Box.scala:978)
        at net.liftweb.common.Failure.$anonfun$exceptionChain$2(Box.scala:978)

errors should nicely accumulate

Actions

Also available in: Atom PDF