mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Merge branch 'master' into alpha
This commit is contained in:
commit
caf53f9861
3 changed files with 7 additions and 2 deletions
|
@ -15,7 +15,7 @@ class Admin::CertificatesController < AdminController
|
||||||
crt = certificate_params[:crt].open.read if certificate_params[:crt]
|
crt = certificate_params[:crt].open.read if certificate_params[:crt]
|
||||||
csr = certificate_params[:csr].open.read if certificate_params[:csr]
|
csr = certificate_params[:csr].open.read if certificate_params[:csr]
|
||||||
|
|
||||||
@certificate = @api_user.certificates.build(csr: csr, crt: crt)
|
@certificate = @api_user.certificates.build(csr: Certificate.sanitize(csr), crt: Certificate.sanitize(crt))
|
||||||
if @api_user.save
|
if @api_user.save
|
||||||
flash[:notice] = I18n.t('record_created')
|
flash[:notice] = I18n.t('record_created')
|
||||||
redirect_to [:admin, @api_user, @certificate]
|
redirect_to [:admin, @api_user, @certificate]
|
||||||
|
|
|
@ -132,6 +132,11 @@ class Certificate < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
def sanitize(c)
|
||||||
|
return nil unless c
|
||||||
|
c.gsub("\r", '')
|
||||||
|
end
|
||||||
|
|
||||||
def update_crl
|
def update_crl
|
||||||
update_id_crl
|
update_id_crl
|
||||||
update_registry_crl
|
update_registry_crl
|
||||||
|
|
|
@ -108,7 +108,7 @@ BLOCKCOUNT=100
|
||||||
# The flag --src is an alias for this option. Multiple addresses can be specified,
|
# The flag --src is an alias for this option. Multiple addresses can be specified,
|
||||||
# but this will expand to multiple rules (when adding with -A),
|
# but this will expand to multiple rules (when adding with -A),
|
||||||
# or will cause multiple rules to be deleted (with -D).
|
# or will cause multiple rules to be deleted (with -D).
|
||||||
REGISTRAR_HANDLE_SOURCE = 'x.x.x.x'
|
REGISTRAR_HANDLE_SOURCE="x.x.x.x"
|
||||||
# default action can be DROP or REJECT or something else.
|
# default action can be DROP or REJECT or something else.
|
||||||
DACTION="REJECT"
|
DACTION="REJECT"
|
||||||
$IPT -A INPUT -p tcp --dport 700 -i eth0 -m state --state NEW -m recent --set
|
$IPT -A INPUT -p tcp --dport 700 -i eth0 -m state --state NEW -m recent --set
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue