Coder Social home page Coder Social logo

Comments (4)

wenheqi avatar wenheqi commented on September 22, 2024 1

I just checked the homepage of js-yaml. Here is what I got:

js-yaml 3.x.x

Both safeLoad and load will parse string as single YAML document. Under the load function, the author of js-yaml says

Use with care with untrusted sources. The same as safeLoad() but uses DEFAULT_FULL_SCHEMA by default - adds some JavaScript-specific types: !!js/function, !!js/regexp and !!js/undefined. For untrusted sources, you must additionally validate object structure to avoid injections

js-yaml 4.x.x

safeLoad is removeda as load is safe by default.

Speaking of trusted sources, if my understanding is correct, minos uses yaml.safeLoad only to parse the _config.lang.yml under minos folder and those .yml files are supplied by the blog developer (minos provided an example _config.yml file to make it easier to start).

I can also help to test some basics like generating static files and serve the files on a server on Hexo 5.3.x and some early versions like 3.6.0 to see if it works with yaml.load and let you know the results on my side. Btw, do we currently have any automated test scripts available? I checked the package.json file in minos root folder but no luck.

from hexo-theme-minos.

ppoffice avatar ppoffice commented on September 22, 2024

Sounds good to me. Look forward to your PR.

from hexo-theme-minos.

wenheqi avatar wenheqi commented on September 22, 2024

#124

from hexo-theme-minos.

ppoffice avatar ppoffice commented on September 22, 2024

by the way, does this change have any impact on hexo 5.3.x and before?

from hexo-theme-minos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.