While working for the previous employer (multinational corporation), my contract had a clause that any work/personal projects that I do outside work must be approved, in writing. Doesn't matter if I only work on them outside working hours. Their justification was that the rest of the time is for me to rest/ I was employed full-time, so they were not comfortable with me e.g. working a second job & being tired at work.
It does sound like a bit of an overreach, and I'm not sure how enforceable their contract really was, but the language was unambiguous and unsanctioned contributions to open source projects were definitely out of the question.
(I'm currently working at a startup, they don't have this problem/ contributions to OSS are encouraged, I just have too much work to do already :D )