mirror of
https://github.com/neocities/neocities.git
synced 2025-04-28 11:12:30 +02:00
add ip of site creators so we can block spammers
This commit is contained in:
parent
3108ffb516
commit
4b82bdec2e
2 changed files with 10 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -54,7 +54,7 @@ end
|
||||||
|
|
||||||
post '/create' do
|
post '/create' do
|
||||||
dashboard_if_signed_in
|
dashboard_if_signed_in
|
||||||
@site = Site.new username: params[:username], password: params[:password], email: params[:email], new_tags: params[:tags], is_nsfw: params[:is_nsfw]
|
@site = Site.new username: params[:username], password: params[:password], email: params[:email], new_tags: params[:tags], is_nsfw: params[:is_nsfw], ip: request.ip
|
||||||
|
|
||||||
recaptcha_is_valid = recaptcha_valid?
|
recaptcha_is_valid = recaptcha_valid?
|
||||||
|
|
||||||
|
|
9
migrations/013_add_ip_address_of_creator.rb
Normal file
9
migrations/013_add_ip_address_of_creator.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
Sequel.migration do
|
||||||
|
up {
|
||||||
|
DB.add_column :sites, :ip, :text
|
||||||
|
}
|
||||||
|
|
||||||
|
down {
|
||||||
|
DB.add_column :sites, :ip
|
||||||
|
}
|
||||||
|
end
|
Loading…
Add table
Reference in a new issue