U.S. Constitution Article 1, Section 9: "No Bill of Attainder or ex post facto Law shall be passed."
In a sane world, this would be a 9-0 decision by the Supreme court to overturn, with stern language of admonishment to the NY State Legislature and governor.
In this world, the Prince of Darkness hold sway.