Lift disabling JavaScript not working in 3.0-M2

65 views
Skip to first unread message

Flavian Alexandru

unread,
Sep 1, 2015, 2:47:01 PM9/1/15
to Lift
We are using the following 4 settings to:
  • Disable all JavaScript loaded by Lift as we don't use any of it.
  • Disable all container sessions as we run a completely stateless application.
Lift 3.0-M2 with Scala 2.11.7 if relevant completely fails to perform all 2 tasks. Sessions are still created and destroyed although no one asks for them and JavaScript is still loaded.

This is somehow loaded automatically:

var lift_settings = {"liftPath": "/lift", "ajaxRetryCount": 3, "ajaxPostTimeout": 5000, "gcPollingInterval": 75000, "gcFailureRetryTimeout": 15000, "cometGetTimeout": 140000, "cometFailureRetryTimeout": 10000, "cometServer": null, "logError": function(msg) {}, "ajaxOnFailure": function() {alert("The server cannot be contacted at this time");}, "ajaxOnStart": function() {}, "ajaxOnEnd": function() {}};
window.lift.extend(lift_settings,window.liftJQuery);
window.lift.init(lift_settings);





LiftRules.autoIncludeComet =  {
(session: LiftSession) => false
}

LiftRules.autoIncludeAjaxCalc.default.set(
() => () => (session: LiftSession) => false
)

LiftRules.javaScriptSettings.request.set(() => () => Empty)

LiftRules.enableContainerSessions = false

Antonio Salazar Cardozo

unread,
Sep 3, 2015, 4:36:56 PM9/3/15
to Lift
Hm, this is definitely an issue. Is this happening in the latest 3.0 milestone? 3.0-M2,
amongst other things, suffers from some security vulnerabilities related to XML parsing.
Thanks,
Antonio

Flavian Alexandru

unread,
Sep 3, 2015, 5:27:54 PM9/3/15
to Lift
Hi Antonio,

Just tried 3.0-M6 for Scala 2.11 but I've got the exact same problem. The following script is still being loaded.

var lift_settings = {"liftPath": "/lift", "ajaxRetryCount": 3, "ajaxPostTimeout": 5000, "gcPollingInterval": 75000, "gcFailureRetryTimeout": 15000, "cometGetTimeout": 140000, "cometFailureRetryTimeout": 10000, "cometServer": null, "logError": function(msg) {lift.logError(msg);}, "ajaxOnFailure": function() {alert("The server cannot be contacted at this time");}, "ajaxOnStart": function() {}, "ajaxOnEnd": function() {}};
window.lift.extend(lift_settings,window.liftJQuery);
window.lift.init(lift_settings);

Antonio Salazar Cardozo

unread,
Sep 4, 2015, 1:37:14 PM9/4/15
to Lift
Got it. Please file a bug (https://github.com/lift/framework/issues) and link back here.
We'll have a look as soon as we can!
Thanks,
Antonio
Reply all
Reply to author
Forward
0 new messages