Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example
This is bad.
Not to mention something similar can be done to any url, e.g. #whatever-you-want or ?_=whatever-you-want
Stackoverflow makes the slug completely optional but you have the choice of only accepting foo and bar in your example