High court upholds anti-terror law