Code Monkey home page Code Monkey logo

cmfx's Introduction

README

ThinkCMF是一款基于PHP+MYSQL开发的中文内容管理框架。ThinkCMF提出灵活的应用机制,框架自身提供基础的管理功能,而开发者可以根据自身的需求以应用的形式进行扩展。每个应用都能独立的完成自己的任务,也可通过系统调用其他应用进行协同工作。在这种运行机制下,开发商场应用的用户无需关心开发SNS应用时如何工作的,但他们之间又可通过系统本身进行协调,大大的降低了开发成本和沟通成本。 官网:http://www.thinkcmf.com 文档:http://www.thinkcmf.com/document

UPDATE

X2.2.2

  • 优化chrome 上传文件时,打开文件选择框慢
  • 修复后台文件添加编辑相册图片移除浏览器不兼容问题
  • 修复文件上传在遨游下不能上传文件问题
  • 修复后台登录错误时提示无样式

X2.2.1

[Core]

  • 优化前后台表单验证
  • 优化手机分页的函数
  • 优化frontend.js所有组件支持提示未登录时跳转
  • 修复lang_switch_on关闭问题
  • 修复评论后刷新页面评论消失
  • common.js增加多文件上传方法upload_multi_file

[Admin]

  • 优化后台分页
  • 修复后台手动添加菜单不添加权限规则
  • 修复后台图标不显示
  • 修复后台菜单界面闪烁
  • 增加url美化添加编辑时字段非空验证
  • 修复后台拉黑后会员还能登录的问题

[Asset]

  • 修复非图片文件上传后缩略片显示问题

[Install]

  • 增加mbstring扩展检测
  • 更改users表birthday字段默认值

[Portal]

  • 增加获取面包屑数据方法是否获取当前分类参数
  • 增加列表瀑布流演示功能
  • 修复收藏文章问题
  • 优化文章页上一篇、下一篇功能

[User]

  • 优化登录页面跳转
  • 修复后台用户列表手机注册用户用户名显示错误
  • 修复前台用户收藏列表没有分页

X2.2.0

[Core]

  • 增加wind.js可以自定义重写js,css的版本
  • 增加$_GET统一urldecode
  • 增加cdn支持
  • 增加微信浏览器判断
  • 增加验证码生成安全性
  • 增加__WEB_ROOT__模板常量
  • 增加跨主题调用模板功能
  • 增加include,extend,block,layout的支持
  • 统一修复session用法问题
  • 统一分页变量名为$page
  • 统一修复系统所有变量未定义错误
  • 优化前台手机模式下的分页
  • 优化分页类
  • 升级ueditor
  • 修复编辑器不能插入动态地图问题
  • 默认取消后台多语言功能

[Admin]

  • 增加后台管理员搜索功能
  • 增加友情链接图标上传
  • 增加列表批量删除提示
  • 增加邮件发送测试
  • 优化发件箱连接方式用下拉列表选择
  • 优化后台登录用户名cookie保存30天
  • 优化已经登录直接跳转到后台首页
  • 修复后台导航添加时卡死问题
  • 修复插件更新配置时,配置文件状态不更新问题
  • 修复后台留言列表留言时间错误

[Asset]

  • 增加七牛cdn整体解决方案
  • 增加统一上传限制,根据上传文件类型设置大小限制
  • 增加上传文件名以应用名为前缀
  • 优化文件上传统一使用plupload上传控件
  • 优化七牛路径前缀
  • 修复七牛上传bad token
  • 修复编辑器的附件不能上传歌曲,歌词等文件类型
  • 修复文章内容里图片上传时返回域名问题
  • 修复七牛华北分区不能上传

[User]

  • 增加后台用户搜索功能
  • 增加前台未登录redirect

[Portal]

  • 增加后台文章批量复制功能
  • 增加面包屑功能
  • 增加文章可以自己定义模板
  • 更改后台文章列表,以posts表为主表显示
  • 更改article控制器参数(cid,id),id是posts表的主键id,cid是分类id
  • 修复文章编辑界面没有取消审核功能
  • 修复禁用的文章,在上一篇下一篇里还是会出现

[Install]

  • 增加安装程序优化验证必须模块
  • 安装程序优化,再次安装时清除data/conf/config.php文件

X2.1.0

  • 修复前台导航缓存问题
  • 修复个人中心mysql5.7下保存失败
  • 文章评论插件化
  • 增加系统评论插件
  • 修复simplebootx模板config文件变量不对应
  • 优化用户激活流程,防止已激活用户和被禁用用户两次发送激活邮件
  • 更正数据库前台导航分类active注释
  • 修复手机模板开启时跳转页面模板路径判断错误
  • 修复重置密码后,重置密码链接仍可打开问题
  • 增加后台评论管理查看原文功能
  • 增强后台登录接口安全性
  • 修复前台分页当前页选中问题
  • 增加全局路由,强化URL美化功能
  • 修复导航添加时导航分类选择问题

祝新年愉快,合家欢乐!

X2.0.0

  • 更改HomeBaseController.class.php文件名为HomebaseController.class.php
  • 移动Common里的Portal model到Portal下;
  • 规范前后台模板目录,themes ,admin/themes;
  • 注意以上升级,有助于您升级到最新版本
  • 增加对PHP7的支持
  • 增强验证码易识别性;
  • 增加后台从菜单栏点击立即刷新选项卡功能;
  • 增加前台模板多语言,插件多语言;
  • 增加后台多语言基础功能,语言包稍后升级完善;
  • 优化后台模板文件;
  • 优化后台登录界面;
  • 优化前台登录、注册、找回密码界面;
  • 优化common.js,frontend.js,规范一系列js-xxx-xxx命名和功能实现;
  • 优化文章编辑页布局和css;
  • 修复模板中U方法大小写错误;
  • 修复ip获取,防止代理访问;
  • 修复success,error跳转页无手机模板问题;
  • 升级百度编辑器;
  • 去除前台各处同意网站条款;
  • 去除文章访问次数统计的ip限制;

X1.6.1

  • 修复登录时仍然可以打开登录和注册界面
  • 修复后台文章分类列表,点添加子类到添加分类界面父级分类选择错误
  • 修复后台文章分类模板修复后不更新问题
  • 修复编辑器里图片上传, 在文件存储选择七牛时,图片title,alt属性不对
  • 增加对php格式模板文件的支持
  • 优化sp_get_menu方法,id为空时,默认为主菜单
  • 修复后台模板缺失问题
  • 修复Portal应用下文章,页面,和分类不存在时,无404状态码
  • 增加对模板继承标签tc_extend的支持
  • 优化会员的拉黑起用功能,改为实时验证
  • 增加url模式更改后出现不能访问问题的提示和解决方法
  • 修复文章,幻灯片添加重复提交问题

X1.6.0

  • 增加静态缓存
  • 增加form提交状态判断,防止连续提交
  • 增加后台被禁用角色和用户登录提示
  • 增加文章可以添加到多个分类
  • 增加管理员停用启用功能
  • 增加文章来源版权申明
  • 增加文章内容页面二维码
  • 增加验证码统一判断方法
  • 优化验证码自动刷新
  • 优化后台样式
  • 修复邮件配置更新时,不会立刻更新问题
  • 修复后台手动新加的菜单时没有同步到auth_rule表
  • 修复角色禁止后登陆报错
  • 修复角色无法删除问题
  • 修复后台视频上传出错!请注意上传大小限制,php.ini post_max_size,upload_max_filesize
  • 修复后台菜单过多不显示
  • 修复后台管理登录可能会被暴力破解
  • 修复后台菜单列表层级问题
  • 修复启用后被删除的插件执行报错

X1.5.0

  • 增加插件机制
  • 增加编辑器附件上传功能
  • 核心升级至thinkphp 3.2.3,必须开启php_pdo_mysql扩展
  • 优化系统权限管理,增加auth+rbac混合认证模式
  • 增加文件存储扩展支持,默认支持本地和七牛云存储
  • 增加手机模板支持
  • 增加手机模板侦测后台开启关闭功能,默认关闭手机模板侦测
  • 增加MUI手机开发框架
  • 增加评论时间间隔设置
  • 增加视频插入
  • 增加去除模板文件里面的html空格与换行
  • 增加后台管理员列表分页
  • 增加文章页上一篇、下一篇功能
  • 优化菜单管理方式,采用增加文件方式菜单管理,方便程序升级
  • 优化导航鼠标划过下拉菜单
  • 优化管理员信息编辑,增加字段过滤
  • 优化非后台入口登录跳转到首页
  • 修复simplebootx搜索链接错误
  • 修复ucenter各种问题
  • 修复后台邮件发件人无法设置
  • 修复入口文件SITE_PATH常量部分服务器异常
  • 修复sae头像裁剪
  • 修复分类编辑时层级出错
  • 修复备份还原数据为空
  • 统一所有模块模板路径分割符为/
  • 删除thinkphp Vendor目录第三方类库
  • 移除SendMail方法
  • 替换scandir方法为sp_scan_dir
  • 统一SAE判断方法
  • 统一ajaxReturn为thinkphp 3.2.*以后用法,如果一直用thinkphp 3.0以前的用法,扩展时注意用sp_ajax_return()做一下升级

注:后台模板分割符已经统一为/,原来的类似Admin/Main.index.html文件已经改为Admin/Main/index.html请后台开发时注意 ThinkCMF全体贡献者祝大家2015年大吉大利,开心幸福!《给你一个吻》

X1.3.0

  • 统一Action为Controller
  • 增加文章搜索功能
  • 增加前台编辑器
  • 增加模板常量__STATICS__
  • 增加最后评论时间写入
  • 修复leuu bug
  • CommonModel _before_write 数据过滤bug
  • 后台评论管理,默认所有评论
  • 文章分类path更新优化
  • simplebootx模板文章页css样式优化
  • 修复分页类bug
  • 后台文章编辑所有文章链接错误
  • 修复bug#4验证码不显示
  • 优化bug#3页面使用LEUU函数后每个页面都查询
  • 优化公共模型的调用方法,以兼容php5.3.0-5.3.2
  • 修复sp_sql_posts_bycatid和sp_sql_posts_paged_bycatid两个方法where语句问题
  • 修复bluesky主题分页样式问题
  • 修复文章推荐,置顶bug

X1.2.0

  • url美化
  • 特殊用户名过滤
  • 增加推荐,置顶功能
  • 幻灯片隐藏显示功能
  • 广告隐藏显示功能
  • 友情链接隐藏显示功能
  • 评论计数

X1.1.0

全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!

  • 统一Member应用为User,合并前台会员和后台管理员
  • 完善用户中心,会员登录注册
  • 增加编辑头像,绑定账号,我的评论,我的收藏
  • 增加文章点赞,收藏,查看功能,可与其它应用共用
  • 增强文章评论功能,方便多应用共用
  • 优化留言功能,增强安全性
  • 优化前台模板,增加多个实用组件,方便以后复用
  • 增加后台风格切换功能;
  • 增加后台风格bluesky
  • 优化后台菜单使用方式
  • 优化数据库中一些不规范字段
  • 增加前台标签库TagLibHome,统一include标签为tc_include

X1.0.0

全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!

  • 统一前后台UI框架为simpleboot(bootstrap 2.3.2 ThinkCMF优化版)
  • 集成Ucenter
  • 增加文章评论功能
  • 增加留言功能
  • 全面支持SAE云平台
  • 增加文章内分页功能
  • 升级后台编辑器到Ueditor最新版本
  • 优化后台ajax提交,未登陆时自动退出
  • 优化后台所有文章按发布时间递减排序
  • 修复后台密码会偶然不对的错误
  • 修复SAE,linux下类库加载失败
  • 修复ueditor chrome模板功能bug
  • 修复文件上传bug

X1.0.0 alpha2

  • 修复SAE,linux下类库加载失败
  • 修复ueditor chrome模板功能bug
  • 修复文件上传bug

X1.0.0 alpha

全新的ThinkPHP 3.2.2架构,使用php命名空间,让开发快起来吧!

  • 集成Ucenter
  • 增加文章评论功能
  • 增加留言功能
  • 全面支持SAE云平台
  • 增加文章内分页功能
  • 升级后台编辑器到Ueditor最新版本
  • 优化后台ajax提交,未登陆时自动退出
  • 优化后台所有文章按发布时间递减排序
  • 修复后台密码会偶然不对的错误

INSTALL

安装请执行http://yourdomain/

ThinkCMF 免责声明

1、利用 ThinkCMF 构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果,ThinkCMF 官方不承担任何责任。

2、您一旦安装使用ThinkCMF,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。

ThinkCMF 使用建议

请在您的网站首页加上ThinkCMF相关链接,O(∩_∩)O~ !

捐赠ThinkCMF

http://www.thinkcmf.com/donate/index.html

您的每一份帮助都将支持ThinkCMF做的更好,走的更远!

ThinkCMF 正在为你开放更多....

cmfx's People

Contributors

chemcms avatar linheyang avatar simplewindorg avatar zxxjjforever avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmfx's Issues

Multiple SQL Injections in ThinkCMF X2.2.2

0x01 SQL Injection of function check() & delete() in CommentadminController.class.php

The vulnerability is located in the check/delete method of /application/Comment/Controller/CommentadminController.class.php.In line 62, $_POST['ids'] parameter is passed to the where statement after the join() function, but Instead of using the in method of the where clause, it is directly spliced into the SQL statement, resulting in SQL injection.The vulnerability needs manager privilege.

POC:
http://127.0.0.1/cmfx/index.php?g=Comment&m=commentadmin&a=check&check=1
POST:  ids[]=1&ids[]=2 and updatexml(1,concat(0x7e,(SELECT user()),0x7e),1)

0x02 SQL Injection of function edit_post() in NavController.class.php

In line 173 of application/Admin/Controller/NavController.class.php,$parentid is passed directly by $_POST['parentid'] and then stitched directly into the where statement.The vulnerability needs manager privilege.

POC:
http://127.0.0.1/cmfx/index.php?g=Admin&m=nav&a=edit_post
POST: parentid=1 and updatexml(1,concat(0x7e,(SELECT user()),0x7e),1)

0x03 SQL Injection of function delete() in SlideController.class.php

In line 93 of application/Admin/Controller/SlideController.class.php, $_POST['ids'] is converted to a string by the implode method, and then directly spliced into the in clause of the where statement.The vulnerability needs manager privilege.

POC
http://127.0.0.1/cmfx/index.php?g=Admin&m=slide&a=delete
POST: ids[]=1&ids[]=0 and updatexml(1, concat(0x7e,user(),0x7e),1)

0x04 SQL Injection of function _listorders() in AdminbaseController.class.php

The _listorders method is used for sorting and is called in many places. Here is an example of listorders() in application/Admin/Controller/LinkController.class.php, which is mainly used for sorting of friendship links. We hit the breakpoint with phpstorm+phpstudy+xdebug and track it step by step. The vulnerability needs manager privilege. POC is

http://127.0.0.1/cmfx/index.php?g=Admin&m=Link&a=listorders
POST: listorders[key][0]=exp&listorders[key][1]=0 and updatexml(1, concat(0x7e,user(),0),1)

First enter the listorders method of application/Admin/Controller/LinkController.class.php line 70, and line 71 calls the parent class's _listorders() method.

Follow the _listorders() method of application/Admin/Controller/LinkController.class.php in line 166, $_POST['listorders'] is passed to to $ids as a two-dimensional array.After foreach loop, input payload $data is still a two-dimensional array.

Following the save() method of simplewind/Core/Library/Think/Model.class.php line 396, which is the core function of thinkphp. Since $data is not empty, many of the previous judgments are skipped to line 452. $data and $options are passed to the update method, and $data is still a two-dimensional array.

Following the update() method of simplewind/Core/Library/Think/Db/Driver.class.php in line 893. $data is spliced into $sql after the parseSet method. Following the definition parseSet method, after $data passes the foreach loop, $val becomes a one-dimensional array, and $key is the key value. When $val is an array and the first element of the array is exp, $val[1] will be directly spliced with $key to $set, and array $set is spliced to the SET statement after the methmod implode.

Return to the update method, the SET clause is spliced into $sql, and the final executed sql statement is

UPDATE `cmf_links` SET `listorder`=0 and updatexml(1, concat(0x7e,user(),0),1) WHERE `link_id` = 'key'

0x05 SQL Injection of method edit_post in ArticleController.class.php

ThinkCMF X2.2.2 is based on ThinkPHP 3.2.3.There is a bind injection before the ThinkPHP 3.x version, and this vulnerability is a typical case of ThinkPHP3.x injection. The vulnerability only needs normal user previlige. The POC is as follows:

http://127.0.0.1/cmfx/index.php?g=portal&m=article&a=edit_post
POST: post[id][0]=bind&post[id][1]=0 and updatexml(1, concat(0x7e,user(),0x7e),1)-- -

install/index_sae.php中admin user创建错误

ln.236 should be:
$query ="INSERT INTO {$dbPrefix}users (ID,user_login,user_pass,user_nicename,user_email,user_url,create_time,user_activation_key,user_status,role_id,last_login_ip,last_login_time) VALUES ('1', '{$username}', '{$password}', '', '{$email}', '', '{$create_date}', '', '1', '1','$ip','$create_date');";

no display_name in sql database

主页LASTNEWS不是最新

$lastnews=sp_sql_posts("cid:$portal_index_lastnews;field:post_title,post_excerpt,object_id,smeta,term_id;order:listorder asc;limit:4;");
themes/simplebootx/Portal/index.html 96行
order

后台友情链接列表无法隐藏友情链接

代码:ThinkCMFX / application / Admin / Controller / LinkController.class.php第107行中的1更改为0
// 友情链接显示/隐藏
public function toggle(){
if(isset($_POST['ids']) && $_GET["display"]){
$ids = I('post.ids/a');
if ($this->link_model->where(array('link_id'=>array('in',$ids)))->save(array('link_status'=>1))!==false) {
$this->success("显示成功!");
} else {
$this->error("显示失败!");
}
}
if(isset($_POST['ids']) && $_GET["hide"]){
$ids = I('post.ids/a');

           //隐藏时link_status应该是0而不是1         
	if ($this->link_model->where(array('link_id'=>array('in',$ids)))->save(array('link_status'=>1))!==false) {
		$this->success("隐藏成功!");
	} else {
		$this->error("隐藏失败!");
	}
}

}

后台的“菜单管理”->“后台菜单”添加、编辑页面选择“类型”后并未根据选项改变效果

我理解效果应该是

如果选择“权限认证+菜单”:管理员可以在后台“角色管理”->“权限设置”将该菜单权限分配给后台角色;
如果选择“只作为菜单”:管理员在后台“角色管理”->“权限设置”不能分配该菜单权限给后台角色,该菜单对所有后台角色的管理员都可见并可用或者该菜单只对超级管理员可见可用,对其他角色的管理员均不可见、不可用。

缺少getDirSize函数,导致Linux服务器不能打开数据还原页面

更新位置 application/Common/Common/function.php

function getDirSize($dir)
{
  $handle = opendir($dir);
  while (false!==($FolderOrFile = readdir($handle)))
  {
      if($FolderOrFile != "." && $FolderOrFile != "..")
      {
          if(is_dir("$dir/$FolderOrFile"))
          {
              $sizeResult += getDirSize("$dir/$FolderOrFile");
          }
          else
          {
              $sizeResult += filesize("$dir/$FolderOrFile");
          }
      }   
  }
  closedir($handle);
  return $sizeResult;   
}

代码少了部分代码

/ 少了tpl_admin
/statics 少了simpleboot
经测从cmf项目中拷贝过来可以正常使用.

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.