OTTAWA—A court has put the brakes on a Canadian Security Intelligence Service request to collect foreign information, ruling a proposed technique would stray beyond the spy service’s legal mandate. The service was seeking court warrants so it could gather intelligence in other countries, from a location inside Canada, to at the request of an unnamed…