mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Mongoimport now fails on invalid UTF8 SERVER-1171
This commit is contained in:
parent
73b955c267
commit
7fc82df75e
@ -21,6 +21,7 @@
|
||||
#include "db/json.h"
|
||||
|
||||
#include "tool.h"
|
||||
#include "../util/text.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
@ -53,6 +54,8 @@ class Import : public Tool {
|
||||
}
|
||||
|
||||
BSONObj parseLine( char * line ){
|
||||
uassert(13289, "Invalid UTF8 character detected", isValidUTF8(line));
|
||||
|
||||
if ( _type == JSON ){
|
||||
char * end = ( line + strlen( line ) ) - 1;
|
||||
while ( isspace(*end) ){
|
||||
|
Loading…
Reference in New Issue
Block a user