{"action":"opened","issue":{"url":"https://api.github.com/repos/minio/minio/issues/1603","repository_url":"https://api.github.com/repos/minio/minio","labels_url":"https://api.github.com/repos/minio/minio/issues/1603/labels{/name}","comments_url":"https://api.github.com/repos/minio/minio/issues/1603/comments","events_url":"https://api.github.com/repos/minio/minio/issues/1603/events","html_url":"https://github.com/minio/minio/issues/1603","id":154348981,"number":1603,"title":"Content-MD5 verification not working for non-multipart PUT object","user":{"login":"felixbuenemann","id":909587,"avatar_url":"https://avatars.githubusercontent.com/u/909587?v=3","gravatar_id":"","url":"https://api.github.com/users/felixbuenemann","html_url":"https://github.com/felixbuenemann","followers_url":"https://api.github.com/users/felixbuenemann/followers","following_url":"https://api.github.com/users/felixbuenemann/following{/other_user}","gists_url":"https://api.github.com/users/felixbuenemann/gists{/gist_id}","starred_url":"https://api.github.com/users/felixbuenemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixbuenemann/subscriptions","organizations_url":"https://api.github.com/users/felixbuenemann/orgs","repos_url":"https://api.github.com/users/felixbuenemann/repos","events_url":"https://api.github.com/users/felixbuenemann/events{/privacy}","received_events_url":"https://api.github.com/users/felixbuenemann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-11T21:38:06Z","updated_at":"2016-05-11T21:38:06Z","closed_at":null,"body":"I have noticed that both on minio 2016-04-17 and master the verification of the Content-MD5 header for PUT object ist not working.\r\n\r\nSending a bad checksum will not return the expected BadDigest error.\r\n\r\nTested on 2016-04-17 with FS and master with FS and XL backends.\r\n\r\nCorrect MD5 Hex: 1b61b1084812eebe8ad8f7e108148e1e\r\nCorrect MD5 Base64: G2GxCEgS7r6K2PfhCBSOHg==\r\n\r\nWrong MD5 Hex: 1b61b1084812eebe8ad8f7e108148e1f\r\nWrong MD5 Base64: G2GxCEgS7r6K2PfhCBSOHw==\r\n\r\n```sh\r\n# try with correct content-md5\r\naws --profile minio --endpoint-url http://localhost:9000 s3api put-object --bucket test \\\r\n  --key Earth10k.jpg --body ~/Pictures/Earth10k.jpg --content-type \"image/jpeg\" \\\r\n  --content-md5 G2GxCEgS7r6K2PfhCBSOHg==\r\n# Got:\r\n{\r\n    \"ETag\": \"\\\"1b61b1084812eebe8ad8f7e108148e1e\\\"\"\r\n}\r\n# try with wrong content-md5\r\naws --profile minio --endpoint-url http://localhost:9000 s3api put-object --bucket test \\\r\n  --key Earth10k.jpg --body ~/Pictures/Earth10k.jpg --content-type \"image/jpeg\" \\\r\n  --content-md5 G2GxCEgS7r6K2PfhCBSOHw==\r\n# Got:\r\n{\r\n    \"ETag\": \"\\\"1b61b1084812eebe8ad8f7e108148e1e\\\"\"\r\n}\r\n# Expected:\r\nA client error (BadDigest) occurred when calling the PutObject operation: The Content-Md5 you specified did not match what we received.\r\n```\r\n\r\n@harshavardhana Has already found the bug and will push a fix shortly."}}