Server: FileSummary (filelist) uses JS Eval

Created on 3 Sep 2018  路  5Comments  路  Source: nextcloud/server

For https://github.com/orgs/nextcloud/projects/18

The FileSummary uses handlebars and compiles the templates on the fly. This prevents a stricter CSP.

1. to develop enhancement

Most helpful comment

we didn't do ship precompiled templates because $forgotten_issues

All 5 comments

@nextcloud/javascript seems that the simplest thing here is just moving this to plain javascript. Converting to vue will happen when the whole fiellist is moved to vue.

For now just moving it to plain js is probably easiest and quickest.

GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/11029 (Contacts menu uses javascript eval), https://github.com/nextcloud/server/issues/5663 (Custom JS in theme failing: 'unsafe-eval'), https://github.com/nextcloud/server/issues/8089 (Filelist not updated in Groupfolder), https://github.com/nextcloud/server/issues/4487 (JS tests failing on CI), and https://github.com/nextcloud/server/pull/11023 (Bump JS deps Accessibility).

thus, handlebars tempalte compilation in general is evil?

thus, handlebars tempalte compilation in general is evil?

@blizzz not by definition. Unsafe eval is evil :wink: . You can also compile your templates and upload the compiled js and use the templates then.

we didn't do ship precompiled templates because $forgotten_issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MorrisJobke picture MorrisJobke  路  3Comments

williambargent picture williambargent  路  3Comments

dl5rcw picture dl5rcw  路  3Comments

ChristophWurst picture ChristophWurst  路  3Comments

Django-BOfH picture Django-BOfH  路  3Comments