codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.21k stars 2.06k forks source link

Maximum call stack size exceeded #1852

Open yiescc opened 2 years ago

yiescc commented 2 years ago
VM2435:1 Uncaught RangeError: Maximum call stack size exceeded
    at String.match (eval at <anonymous> (blog-common.min.js?v=v8fdnsi0xJon8mnbA579IKO0Rxcy5BdMfyVl-gLy-0M:9), <anonymous>:1:4358)
    at editorjs@latest:formatted:3289
    at String.<anonymous> (editorjs@latest:formatted:14580)
    at RegExp.<anonymous> (editorjs@latest:formatted:3302)
    at String.match (<anonymous>)
    at String.match (eval at <anonymous> (blog-common.min.js?v=v8fdnsi0xJon8mnbA579IKO0Rxcy5BdMfyVl-gLy-0M:9), <anonymous>:1:4424)
    at editorjs@latest:formatted:3289
    at String.<anonymous> (editorjs@latest:formatted:14580)
    at RegExp.<anonymous> (editorjs@latest:formatted:3302)
    at String.match (<anonymous>)

from this code

        t.exports = function(t, e, n) {
            var d = s(t)
              , p = !i((function() {
                var e = {};
                return e[d] = function() {
                    return 7
                }
                ,
                7 != ""[t](e)
            }
            ))
              , h = p ? !i((function() {
                var e = !1
                  , n = /a/;
                return n.exec = function() {
                    return e = !0,
                    null
                }
                ,
                "split" === t && (n.constructor = {},
                n.constructor[c] = function() {
                    return n
                }
                ),
                n[d](""),
                !e
            }
            )) : void 0;
            if (!p || !h || "replace" === t && !u || "split" === t && !f) {
                var v = /./[d]
                  , g = n(a, d, ""[t], (function(t, e, n, o, r) {
                    return e.exec === l ? p && !r ? {
                        done: !0,
                        value: v.call(e, n, o)
                    } : {
                        done: !0,
                        value: t.call(n, e, o) // this one!!!
                    } : {
                        done: !1
                    }
                }
                ))
                  , y = g[0]
                  , b = g[1];
                o(String.prototype, t, y),
                r(RegExp.prototype, d, 2 == e ? function(t, e) {
                    return b.call(t, this, e)
                }
                : function(t) {
                    return b.call(t, this)
                }
                )
            }
neSpecc commented 2 years ago

How to reproduce?