From: Yehuda Sadeh Date: Tue, 15 Nov 2011 01:02:08 +0000 (-0800) Subject: rgw: don't log entries with bad utf8 X-Git-Tag: v0.39~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e195500b5d3a8ab8512bcf2a219a6b7ff922c97;p=ceph.git rgw: don't log entries with bad utf8 --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 066ec0abdbab..51caaef044b6 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -1,4 +1,5 @@ #include "common/Clock.h" +#include "common/utf8.h" #include "rgw_log.h" #include "rgw_acl.h" @@ -97,6 +98,11 @@ int rgw_log_op(struct req_state *s) } entry.bucket = s->bucket_name; + if (check_utf8(s->bucket_name, entry.bucket.size()) != 0) { + dout(0) << "not logging op on bucket with non-utf8 name" << dendl; + return 0; + } + if (s->object) entry.obj = s->object; else