有在研究thinkphp框架的吗?帮忙看看会不会有注入

@老虎会游泳,thinkphp的验证码类实在猥琐-_-|||。。。没办法,自己又重写了一个验证码类,可是总感觉有注入点,没办法,最近总是疑神疑鬼的,我都有点不相信自己了-_-。。。大婶们帮忙看看这样写有木有注入。。。
<?php

class IndexAction extends Action {
	/*
	 * 登陆页视图
	 */
    public function index (){
	$this->display(login);
    }
    
    
    /*
     * 验证码
     */
    public function code () {
    	//导入自定义的验证码类库
    	import('Class.Image', APP_PATH);
    	//NEW一个对象
    	$code = new Image();
    	$code->doimg();
    	//把session信息保存到超全局变量session中
    	$_SESSION['checkcode'] = $code->getCode();
    }
    
    
    /*
     * 登陆操作
     */
    public function login () {
    	//通过thinkphp验证是否为post提交,否则输出错误信息
    	if (!IS_POST) halt('非法请求!!');
    	//如果不是非法请求,就用I方法把验证码信息取出并过滤转化为小写,不等于保存到超全局变量session中的checkcode的话,
    	//输出验证码错误!
    	if (I('code', '', 'strtolower') != session('checkcode')) $this->error('验证码错误');
 
	}

}
?>

谢谢了!!
回复列表(6|隐藏机器人聊天)
添加新回复
回复需要登录