This is kind of related to this question: Can a UN member be penalized for threatening the destruction of another member? In one of the answers, it is written that "the UN can do whatever won't get a veto in the security council".
Literally, "whatever" means a resolution could include something quite contrary to the principles of the UN, like "let us kill all people with the flu, then all bold people, and then cut off the left hand thumbs of all the newborns for the next seventeen weeks".
Is there in the UN charter or a similar document a safeguard against emitting such resolutions ? Rules that apply directly to the content of the resolutions, whatever the votes in favor of it are ?
I was thinking about mass murder or ethnic cleansing, but there may be others. I looked a little in the charter, but didn't find anything like that.