Skip to content

Commit

Permalink
添加输入过滤,修正id传递的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
easychen committed Feb 25, 2018
1 parent 1881398 commit 83829f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data/web/resume_detail.php
@@ -1,6 +1,6 @@
<?php

$id = intval( $_REQUEST );
$id = intval( $_REQUEST['id'] );
if( $id < 1 ) die("错误的简历ID");

try
Expand Down
2 changes: 1 addition & 1 deletion data/web/resume_modify.php
Expand Up @@ -6,7 +6,7 @@
die("请先<a href='user_login.php'>登入</a>再添加简历");
}

$id = intval( $_REQUEST );
$id = intval( $_REQUEST['id'] );
if( $id < 1 ) die("错误的简历ID");

try
Expand Down
2 changes: 1 addition & 1 deletion data/web/resume_save.php
Expand Up @@ -11,7 +11,7 @@

// 获取输入参数
$title = trim( $_REQUEST['title'] );
$content = trim( $_REQUEST['content'] );
$content = strip_tags( trim( $_REQUEST['content'] ));

// 参数检查
if( strlen( $title ) < 1 ) die("简历名称不能为空");
Expand Down
2 changes: 1 addition & 1 deletion data/web/resume_update.php
Expand Up @@ -12,7 +12,7 @@
// 获取输入参数
$id = intval( $_REQUEST['id'] );
$title = trim( $_REQUEST['title'] );
$content = trim( $_REQUEST['content'] );
$content = strip_tags( trim( $_REQUEST['content'] ));

// 参数检查
if( strlen( $id ) < 1 ) die("简历ID不能为空");
Expand Down

0 comments on commit 83829f8

Please sign in to comment.