Your implementation of
windows
is insecure.