mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
3e331b1725
Why this change? Firstly, note that this is not a security commit because this feature is still in development and should not be used anywhere. The reason we want to set a limit here is to greatly reduce the possibility of a DoS attack in the future via `ThemeSetting` where someone would set an arbituary large json string in `ThemeSetting#json_value` and causing the server to run out of resources trying to serialize/deserialize the value. What does this change do? Adds an ActiveRecord validation to ensure that the bytesize of the json string being stored is smaller than or equal to 0.5mb. We believe 0.5mb is a decent limit for now but we can review the limit in the future if we believe it is too small. |
||
---|---|---|
.. | ||
cloud/cloud66 | ||
environments | ||
initializers | ||
locales | ||
application.rb | ||
boot.rb | ||
cdn.yml.sample | ||
database.yml | ||
deploy.rb.sample | ||
dev_defaults.yml | ||
discourse_defaults.conf | ||
discourse.config.sample | ||
discourse.pill.sample | ||
environment.rb | ||
logrotate.conf | ||
multisite.yml.production-sample | ||
nginx.global.conf | ||
nginx.sample.conf | ||
projections.json | ||
puma.rb | ||
routes.rb | ||
sidekiq.yml | ||
site_settings.yml | ||
spring.rb | ||
thin.yml.sample | ||
unicorn_launcher | ||
unicorn_upstart.conf | ||
unicorn.conf.rb |