Can clients download shared lua files?
I was told by someone not too long ago that clients can download shared lua files. I myself am not too sure on this and would like to know if anyone can give me a definite answer.
Yes, shared lua will be run on both sides (so clients will download it)
(Server-side lua files will not be downloaded while client-side files will not be run on Server)
more informations: https://wiki.garrysmod.com/page/States
Thanks for the answer! Would they be able to view the contents of the file when they download it? So lets say an addon has a shared config file, after the client downloads it would they be able to view everything inside it?
Yes.
If what you're getting at is "If I wrap part of the file in an if SERVER then can they still see it?" the answer is yes. All too many a time people have put their MySQL config inside a shared config file and at that point it's leaked to everyone.
Going off of what Owain says, any SQL code in a shared file can be dangerous, as it can show vulnerabilities. Clients can force certain illegal network messages to the server and put in open strings and such, their own lines of SQL