From 5df59d1bb5e5b94bdbc26cc5d64ecd28b05033b6 Mon Sep 17 00:00:00 2001 From: Anant Shrivastava Date: Sat, 2 Jul 2022 16:11:11 +0530 Subject: [PATCH 1/3] switching null.co.in to null.community and moving to https urls --- README.md | 2 +- app/helpers/application_helper.rb | 6 +++--- app/views/events/show.html.erb | 4 ++-- app/views/home/about.html.erb | 2 +- app/views/home/index.html.erb | 2 +- app/views/layouts/_footer.html.erb | 6 +++--- app/views/layouts/_header.html.erb | 2 +- app/views/registrations/edit.html.erb | 10 +++++----- config/application.rb | 2 +- config/deploy.rb | 4 ++-- sys/nginx/null_automation.conf | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 92b68d5..899f8eb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # null Swachalit -This repository contains source code of application used to run https://null.co.in +This repository contains source code of application used to run https://null.community [![CircleCI](https://circleci.com/gh/null-open-security-community/swachalit/tree/master.svg?style=svg)](https://circleci.com/gh/null-open-security-community/swachalit/tree/master) ![Build and Test](https://github.com/null-open-security-community/swachalit/workflows/Rails%20Build%20and%20Test/badge.svg) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 27b171e..f7e06ea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -74,11 +74,11 @@ def sm_icon_with_link(icon, link, size = '40x40') end end - def twitter_icon(url = 'http://www.null.co.in', size = '40x40') + def twitter_icon(url = 'https://www.null.community', size = '40x40') sm_icon_with_link('twitter', url, size) end - def facebook_icon(url = 'http://www.null.co.in', size = '40x40') + def facebook_icon(url = 'https://www.null.community', size = '40x40') sm_icon_with_link('facebook', url, size) end @@ -95,7 +95,7 @@ def safe_url(s) return '#' if s =~ /\Ajavascript/i return '#' if s =~ /\Achrome/i return '#' if s =~ /\Aabout/i - return "http://#{s}" if s !~ /\Ahttp/i # Force protocol + return "https://#{s}" if s !~ /\Ahttp/i # Force protocol return s end diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb index 9d7873f..2dd4e40 100644 --- a/app/views/events/show.html.erb +++ b/app/views/events/show.html.erb @@ -67,11 +67,11 @@ - + - +

diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index f70d767..1d4ba54 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -10,7 +10,7 @@

About

- This portal will host event related information for null community. For more details <%= link_to "go here", "http://www.null.co.in", :target => '_blank' %>. + This portal will host event related information for null community. For more details <%= link_to "go here", "https://www.null.community", :target => '_blank' %>.

This application is now open source and available in our <%= link_to "Github", "https://github.com/null-open-security-community/swachalit", target: '_blank', rel: 'noreferer' %> diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 7694c66..61ac4b8 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -74,7 +74,7 @@ null is open, professional, inclusive, responsible, and most importantly complet

Security Jobs
- +

<%= fa_icon('external-link') %>

diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index a29361b..97e1ca0 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -13,8 +13,8 @@
    -
  • <%= twitter_icon('http://www.twitter.com/null0x00') %>
  • -
  • <%= facebook_icon('http://www.facebook.com/null0x00') %>
  • +
  • <%= twitter_icon('https://www.twitter.com/null0x00') %>
  • +
  • <%= facebook_icon('https://www.facebook.com/null0x00') %>
  • <%= group_icon('https://groups.google.com/forum/#!forum/null-co-in') %>
@@ -25,7 +25,7 @@
- Made with Ruby on Rails with love from Twitter Bootstrap & Bootswatch. + Made with Ruby on Rails with love from Twitter Bootstrap & Bootswatch. Checkout our <%= link_to 'Privacy Policy', privacy_path %>
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 08be835..544bc19 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -76,7 +76,7 @@
  • - <%= fa_icon('rss') %> Blog + <%= fa_icon('rss') %> Blog
  • diff --git a/config/application.rb b/config/application.rb index 7d90e94..3a1eb57 100644 --- a/config/application.rb +++ b/config/application.rb @@ -74,7 +74,7 @@ class Application < Rails::Application if Rails.env.development? Rails.application.routes.default_url_options[:host] = '127.0.0.1' else - Rails.application.routes.default_url_options[:host] = ENV['APPLICATION_HOST'] || 'null.co.in' + Rails.application.routes.default_url_options[:host] = ENV['APPLICATION_HOST'] || 'null.community' end require 'dotenv/load' diff --git a/config/deploy.rb b/config/deploy.rb index 4d3f4d9..5f4b855 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -13,8 +13,8 @@ set :user, "abhisek" set :use_sudo, false -role :app, "null.co.in" -role :web, "null.co.in" +role :app, "null.community" +role :web, "null.community" namespace :deploy do task :start do ; end diff --git a/sys/nginx/null_automation.conf b/sys/nginx/null_automation.conf index be7f9b2..7432c61 100644 --- a/sys/nginx/null_automation.conf +++ b/sys/nginx/null_automation.conf @@ -4,8 +4,8 @@ upstream app1 { server { listen 173.255.246.230:8000; - server_name swachalit.null.co.in; - proxy_redirect http://swachalit.null.co.in/ /; + server_name swachalit.null.community; + proxy_redirect http://swachalit.null.community/ /; client_body_timeout 300; client_max_body_size 10M; From 3fd992838a0594e64da70a6d89de91bb37623aea Mon Sep 17 00:00:00 2001 From: Anant Shrivastava Date: Sat, 2 Jul 2022 16:26:22 +0530 Subject: [PATCH 2/3] Update _footer.html.erb --- app/views/layouts/_footer.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb index 97e1ca0..e037660 100644 --- a/app/views/layouts/_footer.html.erb +++ b/app/views/layouts/_footer.html.erb @@ -25,7 +25,7 @@
    - Made with Ruby on Rails with love from Twitter Bootstrap & Bootswatch. + Made with Ruby on Rails with love from Twitter Bootstrap & Bootswatch. Checkout our <%= link_to 'Privacy Policy', privacy_path %>
    From cd8be1e46084dce180c4ba214de4a51c38d7a537 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Thu, 23 Feb 2023 20:39:34 +0000 Subject: [PATCH 3/3] fix: Dockerfile to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-DEBIAN9-DPKG-2847943 - https://snyk.io/vuln/SNYK-DEBIAN9-OPENSSL-1075328 - https://snyk.io/vuln/SNYK-DEBIAN9-OPENSSL-1569399 - https://snyk.io/vuln/SNYK-DEBIAN9-OPENSSL-2807589 - https://snyk.io/vuln/SNYK-DEBIAN9-OPENSSL-339889 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7f69bd6..72a63d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.6.2-slim +FROM ruby:3.1.3-slim RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libsqlite3-dev default-libmysqlclient-dev libxml2-dev WORKDIR /app