简要描述:用户评论照片时,输入特定字符可导致
服务器返回未经处理的异常信息,其中包括数据库中相关表结构
详细说明:在评论照片时,mac osx下safari中,输入mac自带表情符号时,导致
服务器返回异常信息,其中包括了图片评论的表结构,具体如下:
PreparedStatementCallback; uncategorized SQLException for SQL [insert into photo_comment_39(id, owner, photo, author, name, head_url, body, time) values (?, ?, ?, ?, ?, ?, ?, ?)]; SQL state [HY000]; error code [1366]; Incorrect string value: 'xF0x9Fx98x84xE5x93...' for column 'body' at row 1; nested exception is
java.sql.SQLException: Incorrect string value: 'xF0x9Fx98x84xE5x93...' for column 'body' at row 1
www.atcpu.com漏洞证明:
修复方案:
对异常信息就行处理,或修改表的定义,支持mac输入法自带的表情符号等字符