I was hired to create a computer program. The client gave me directions on what it should do and how the UI should look like (complete with pictures). No formal contract was ever made, and I realize now this was a mistake. My question is, in the absence of everything else, am I allowed to post the code on sites like Github and give it an open source license? This might upset the client as they may be intending to sell the program. My friend pointed out, an idea is automatically copyrighted when someone comes up with it. So the client would own the program because they came up with the need for it and its functionality. Is this correct? If I'm not their employee but a contractor, how might this affect it? This in Canada.
The program is relatively simple and doesn't contain any trade secrets or proprietary business logic (it's more of a productivity tool for the average PC user).
TL;DR would it be breaking the law if the contractor made the source code available to the public even if the client didn't want them to (if no contracts were agreed)?