Before having limits, humor must be funny.
If you're doing opinionated, personal humor, then yes, humor needs to have limits.
I still don't understand why people place humor above every other aspect of life, as if it were a superior, untouchable entity. Regarding the limits of humor, the issue is far more complicated than the "experts" on humor and TV scattered across social media make it seem. To shout that humor can't have limits is, in itself, as idiotic as shouting that humor must have limits. A distinction must be made here.
In drama, humor should have no limits. Neither humor nor any other genre. In drama, the attitudes and dialogue of the characters do not necessarily reflect the author's opinion. If a character rapes someone, the author is not inciting rape, but merely using rape as a dramaturgical tool, in the name of the story. The author of Scarface must not be in favor of drug trafficking, just as the author of The Texas Chainsaw Massacre must not be a crazy psychopath. If humor is being displayed in the form of drama, there is no need to talk about limits, since, as I said, the story does not necessarily reflect the author's opinion.
But there's another side to it. If you're doing opinionated, personal humor, then yes, humor has to have limits. If you say, in your own words, without a character, that ugly women should thank their rapists and that you would have sex with a pregnant woman and her child, then yes, you are giving your opinion on rape and violence. I'm not saying that Rafinha Bastos is a sympathizer of rapists, but he expressed his opinion, even if through a joke. Very unfunny, but still a joke. Now we enter an even more controversial point. Please read "controversial" in quotation marks.
"Controversial" and "politically incorrect" humor is all the rage. Look, I have nothing against being politically incorrect or controversial. Chico Anysio was politically incorrect and a genius, as were Os Trapalhões, Jô Soares, TV Pirata, etc. But what's the difference between those mentioned above and the politically incorrect comedians of today? The humor. In the past, comedians were controversial but they were funny. Controversy was used as a tool, not as a crutch, as it is today. Nowadays, "controversy" and "politically incorrect" humor are used to mask a lack of talent and humor. And this is fueled by this generation that thinks everything that is incorrect and controversial is funny, even if it's not funny. And that's how the circus was created. Rafinha Bastos and Danilo Gentilli make jokes that aren't funny at all, but because they're offensive and "controversial," they're quickly embraced and adopted by the "rebellious generation without a cause, wearing Che Guevara t-shirts from Ellus." And this generation defends them tooth and nail, believing that they should be increasingly "controversial" at the expense of being funny. I miss the days when humor wasn't concerned with being politically incorrect, controversial, or offensive. I miss the days when humor was solely concerned with being funny. Good times when jokes offended, but made people laugh.