Overflowed Admin Setting


(Slind) #1

Hey,

I think I overflowed an integer in the sites admin settings (trust_level_1 -> posts). I can’t load the settings page anymore as it throws a 500 error. How can i undo this mistake?


(Sam Saffron) #2

cd /var/discourse
./launcher ssh app
rails c
SiteSetting.xyz = 1


(Slind) #3

thanks, where can I find the exact name?

nvm: SELECT * FROM site_settings;


(Jeff Atwood) #4

Let us know which setting it was so we can add protection for this!


(Slind) #5
 56 | tl1_requires_time_spent_mins      |         3 | 999999999999999999999999                                                                                                          | 2014-11-03 22:25:44.499572 | 2014-11-03 22:25:58.174155
 57 | tl1_requires_read_posts           |         3 | 999999999999999999999999                                                                                                          | 2014-11-03 22:25:44.771983 | 2014-11-03 22:25:58.487568
 58 | tl1_requires_topics_entered       |         3 | 999999999999999999999999                                                                                                          | 2014-11-03 22:25:45.497448 | 2014-11-03

Cannot Access Admin Area due to 'Server Error while trying to load /admin/users/1.json'
(Jeff Atwood) #6


(Slind) #7

I’m looking for a way to have only one topic where people with an account can leave a reply (whitelist request). When accepted a staff promotes them. As moderators are not able to assign groups only the trust levels are left.
If I would enable the “require account activation”, they couldn’t leave a reply at this one thread. Further do I have a problem with not being able to prevent people from creating threads in "uncategorized’. :confused:

Is it possible to customize the “An account is required. Please create an account or log in to continue.” page that appears if you enable the general setting that viewing of anything requires an account?


(Jeff Atwood) #8

We now protect against integer overflow in site settings thanks to @techapj!


(Jeff Atwood) #9