Exploit database

GH-f3e9aa5ff14901b11dd5d48ffe7c37ab

zapstiko/cve-2026-116214

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-116214

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files31

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lab/maccms/application/common/model/Annex.php

PHP · 3,466 bytes
<?php
namespace app\common\model;
use think\Db;

class Annex extends Base {
    // 设置数据表(不含前缀)
    protected $name = 'annex';

    // 定义时间戳字段名
    protected $createTime = '';
    protected $updateTime = '';

    // 自动完成
    protected $auto       = [];
    protected $insert     = [];
    protected $update     = [];

    public function countData($where)
    {
        $total = $this->where($where)->count();
        return $total;
    }

    public function listData($where,$order,$page=1,$limit=20,$start=0,$field='*',$addition=1,$totalshow=1)
    {
        if(!is_array($where)){
            $where = json_decode($where,true);
        }
        $limit_str = ($limit * ($page-1) + $start) .",".$limit;
        if($totalshow==1) {
            $total = $this->where($where)->count();
        }
        $list = Db::name('Annex')->field($field)->where($where)->order($order)->limit($limit_str)->select();
        return ['code'=>1,'msg'=>lang('data_list'),'page'=>$page,'pagecount'=>ceil($total/$limit),'limit'=>$limit,'total'=>$total,'list'=>$list];
    }

    public function infoData($where,$field='*')
    {
        if(empty($where) || !is_array($where)){
            return ['code'=>1001,'msg'=>lang('param_err')];
        }

        $info = $this->field($field)->where($where)->find();
        if (empty($info)) {
            return ['code' => 1002, 'msg' => lang('obtain_err')];
        }
        $info = $info->toArray();

        return ['code'=>1,'msg'=>lang('obtain_ok'),'info'=>$info];
    }

    public function saveData($data)
    {
        $validate = \think\Loader::validate('Annex');
        if(!$validate->check($data)){
            return ['code'=>1001,'msg'=>lang('param_err').':'.$validate->getError() ];
        }

        if(!empty($data['annex_id'])){
            $where=[];
            $where['annex_id'] = ['eq',$data['annex_id']];
            $res = $this->allowField(true)->where($where)->update($data);
        }
        else{
            $data['annex_time'] = time();
            $res = $this->allowField(true)->insert($data);
        }
        if(false === $res){
            return ['code'=>1002,'msg'=>lang('save_err').':'.$this->getError() ];
        }
        return ['code'=>1,'msg'=>lang('save_ok')];
    }

    public function delData($where)
    {
        $list = $this->listData($where,'',1,9999);
        if($list['code'] !==1){
            return ['code'=>1001,'msg'=>lang('del_err').':'.$this->getError() ];
        }

        $path = './';
        foreach($list['list'] as $k=>$v){
            $pic = $path.$v['annex_file'];
            if(file_exists($pic) && (substr($pic,0,8) == "./upload") || count( explode("./",$pic) ) ==1){
                unlink($pic);
            }
        }
        $res = $this->where($where)->delete();
        if($res===false){
            return ['code'=>1001,'msg'=>lang('del_err').':'.$this->getError() ];
        }


        return ['code'=>1,'msg'=>lang('del_ok')];
    }

    public function fieldData($where,$col,$val)
    {
        if(!isset($col) || !isset($val)){
            return ['code'=>1001,'msg'=>lang('param_err')];
        }

        $data = [];
        $data[$col] = $val;
        $res = $this->allowField(true)->where($where)->update($data);
        if($res===false){
            return ['code'=>1001,'msg'=>lang('set_err').':'.$this->getError() ];
        }
        return ['code'=>1,'msg'=>lang('set_ok')];
    }

}