Fixed unbound variables in auth post handler
Merged upstream/master