Skip to content
This repository was archived by the owner on Jan 25, 2020. It is now read-only.
This repository was archived by the owner on Jan 25, 2020. It is now read-only.

when render data has properties like "views,settings,ext", it will throw errors #21

@winnieBear

Description

@winnieBear

when call like this in controller,

var data = {
    "key is not views,settings,ext":"run ok "
   };
    res.render('index', data);

if data has no properties like "views,settings,ext", it can run ok,

BUT,when data has these properties,like this

var data = {
    name: 'test',
    views: 'this is test string!',
    settings: 'this is the data from models',
    ext:'but it will not ok!'
  };
  res.render('index', data);

the programe will throw errors of 503.

I find these errors is caused by adaro\lib\engine.js,adaro\lib\utils.js, in which the above three properties is used as important parameters.

But these properties name can also be used as data for render. When your data has "views,settings,ext" properties name, the programe will core.

You can git checkout my test case to verify it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions