Since the world is full of pretty poor managers "don't swear at your boss" is pragmatic advice. It'd be nice if all managers had the skill to recognise that a bit of venting is probably healthy.
"Don't work for managers you can't swear at," would be my advice to the world :D
That's good advice for people who are in a position to chose who they work for. Is OP in that position?
Good managers let their employees vent, when necessary, and don't take it personally.
Insecure ones get all uppity about things like that.