JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

Can we rename the default config? #120

Closed davwheat closed 3 years ago

davwheat commented 3 years ago

Trying to work on this project is painful when I need to constantly worry if I'm accidentally about to overwrite the default config with mine instead, or leak my secure key.

Can we rename config.php to config.default.php then add config.php to the gitignore file?

It'll also be worth showing an error if no config.php is present, for people installing this for the first time. This wouldn't affect existing installs.

davwheat commented 3 years ago

Also... these say disabled by default when they're enabled by default.

https://github.com/JoeGandy/ShareX-Custom-Upload/blob/9f2b740bb7022e891c310c4000678c2d38c926c2/src/config.php#L62-L69

theaquarium commented 3 years ago

Yeah, I think that’s a good idea. Feel free to leave a PR for it. For the error message, you can probably do a check in merge_config.php and show the error from there.

As for the defaults, I think that’s a symptom of the exact issue you’re describing :). I probably left those as true from when I was testing config. However, I’d keep them as true because I think it’s good to expose as many features as possible to new users and then allow them to disable them if they don’t want to use the features. Let me know what you think.

davwheat commented 3 years ago

I agree with you on that last point! People can always turn them off, but if they don't know they exist in the first place, they'll never know...

davwheat commented 3 years ago

Closed by #122