The War of 1812: Loyalty and Treason In Upper Canada is an article on the Ontario [Canada] Ministry of Government Services website.
"Wartime in Upper Canada, which had a mixed population of loyalists and more recent American immigrants, posed problems for individuals and the government."
"There is no doubt that some residents actively helped American forces when parts of Upper Canada were under military occupation."
"On March 14, 1814, the Legislature of Upper Canada passed three acts as emergency measures. The first limited the right to habeas corpus applications for those accused of treason; the second provided for trials for treason and related charges in districts outside the area where the alleged offences occurred; the third act, and the one that had the greatest impact, was the Alien Act which made it an offence for anyone to have left the province after July 1812 for the United States."