OpenCart 3.0.3.8 无效令牌/Javascript 问题

问题描述 投票:0回答:1

我正在尝试对 Opencart 安装进行故障排除,该安装在 2023 年 12 月之前一直运行良好。目前,当我选择管理面板左侧的菜单或页面上的选项卡时,我将收到无效令牌错误,我需要再次登录。 htaccess 配置正确并且没有 PHP 错误。然而 Javascript 调试器会给我以下错误:

Uncaught SyntaxError: expected expression, got '}'
jquery-2.1.1.min.js:5:2623
Uncaught SyntaxError: expected expression, got '}'
bootstrap.min.js:7:7279
Uncaught SyntaxError: expected expression, got '}'
moment.min.js:7:21941
Uncaught SyntaxError: expected expression, got '}'
moment-with-locales.min.js:505:12296
Uncaught SyntaxError: expected expression, got '}'
bootstrap-datetimepicker.min.js:1385:2623
Uncaught SyntaxError: expected expression, got '}'
common.js:288:2623
Uncaught SyntaxError: expected expression, got '}'
jquery.vmap.js:75:2798
Uncaught SyntaxError: expected expression, got '}'
jquery.vmap.world.js:1:63187
Uncaught ReferenceError: $ is not defined
    <anonymous> https://bookstore.esnk.org/admin/index.php?route=common/dashboard&user_token=xxxxxxxxxxxxxxxx:320
index.php:320:1
Uncaught SyntaxError: expected expression, got '}'
jquery.flot.js:406:2946
Uncaught SyntaxError: expected expression, got '}'
jquery.flot.resize.min.js:19:3826
Uncaught ReferenceError: $ is not defined
    <anonymous> https://bookstore.esnk.org/admin/index.php?route=common/dashboard&user_token=xxxxxxxxxxxxxx:374
index.php:374:1
Uncaught ReferenceError: $ is not defined
    <anonymous> https://bookstore.esnk.org/admin/index.php?route=common/dashboard&user_token=xxxxxxxxx:521

索引 PHP 将在第一个 $ 符号处出错:

$('#range a').on('click', function(e) {
    e.preventDefault();
    
    $(this).parent().parent().find('li').removeClass('active');
    
    $(this).parent().addClass('active');
    
    $.ajax({
        type: 'get',
        url: 'index.php?route=extension/dashboard/chart/chart&user_token=xxxxxxxxxxx5&range=' + $(this).attr('href'),
        dataType: 'json',
        success: function(json) {
            if (typeof json['order'] == 'undefined') { return false; }
            
            var option = {  
                shadowSize: 0,
                colors: ['#9FD5F1', '#1065D2'],
                bars: { 
                    show: true,
                    fill: true,
                    lineWidth: 1
                },
                grid: {
                    backgroundColor: '#FFFFFF',
                    hoverable: true
                },
                points: {
                    show: false
                },
                xaxis: {
                    show: true,
                    ticks: json['xaxis']
                }
            }

有什么想法如何解决这个问题吗?请注意,我在这篇文章中将令牌替换为 XXXXXXX。

javascript php jquery opencart
1个回答
0
投票

我发现该网站被木马感染,该木马修改了.js文件,替换所有.js文件解决了问题。

© www.soinside.com 2019 - 2024. All rights reserved.