The constitutionality of the law was upheld by the Supreme Court in the Prize Cases.
I have woodpusher to thank for my response to you on this particular point.
" In 1863, Congress raised the number of justices to ten (10), so Lincoln could pack the Court with a fifth Lincoln appointee to ensure against legal disaster. After Andrew Johnson took office, in 1866 Congress reduced the number of justices to seven (7) by attrition, although never fell below eight (8), ensuring Democrat Johnson never got to appoint anybody. After Johnson left and Grant took office, Congress returned the number of justices to nine (9) in 1869, and enabled Grant to make an appointment.That about took care of Court opinions condemning Lincoln administration actions for much of his administration. "