Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a IPv6 address parsing error #200

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.25
2.7.26
22 changes: 12 additions & 10 deletions ci/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
FROM fedora:latest
FROM alpine:3.18
EXPOSE 80 443
LABEL no.uio.contact=usit-gid@usit.uio.no
LABEL no.uio.contact=usit-dia@usit.uio.no
LABEL description="Web server for Nivlheim"
ARG BRANCH=""

RUN dnf install -y httpd mod_ssl procps-ng \
unzip file bind-utils npm \
&& dnf install -y --releasever=39 openssl \
&& dnf clean all \
&& rm -rf /var/cache/yum \
&& npm install -g handlebars
RUN apk update && apk upgrade \
&& apk add apache2 apache2-ssl apache2-utils apache2-proxy procps-ng unzip file bind-tools npm bash curl \
&& apk add openssl1.1-compat && rm /usr/bin/openssl && ln /usr/bin/openssl1.1 /usr/bin/openssl \
&& rm -rf /var/cache/apk/*
RUN npm install -g handlebars

# config
COPY server/openssl_ca.conf /etc/nivlheim/
COPY server/client_CA_cert.sh /usr/bin/
COPY server/httpd_ssl.conf /etc/httpd/conf.d/ssl.conf
COPY server/httpd.conf /etc/httpd/conf/httpd.conf
COPY server/httpd_ssl.conf /etc/apache2/conf.d/ssl.conf
COPY server/httpd.conf /etc/apache2/httpd.conf

# before moving to Alping we used this log directory so let's continue with that
RUN mkdir /var/log/httpd

# copy the static web content
COPY server/website /var/www/html/
Expand Down
9 changes: 4 additions & 5 deletions ci/docker/api_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ COPY server/service/*.go ./
COPY server/service/database ./database
COPY server/service/utility ./utility

RUN go build -o /nivlheim -ldflags "-X main.version=${version:-UNDEFINED}"
RUN CGO_ENABLED=0 go build -o /nivlheim -ldflags "-X main.version=${version:-UNDEFINED}"

## Deploy
FROM ubuntu:latest
MAINTAINER [email protected]
LABEL [email protected]
FROM alpine:3.18
LABEL [email protected]
LABEL description="Main Nivlheim server exposing API"

EXPOSE 4040

WORKDIR /

RUN apt-get update -qq && apt-get install -yqq ca-certificates
RUN apk --no-cache add ca-certificates
COPY --from=build /nivlheim /nivlheim
COPY server/server.conf /etc/nivlheim/server.conf

Expand Down
1 change: 0 additions & 1 deletion ci/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
nivlheimweb:
container_name: docker-nivlheimweb-1
Expand Down
2 changes: 1 addition & 1 deletion client/nivlheim_client
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ my $NAME = 'nivlheim_client';
my $AUTHOR = 'Øyvind Hagberg';
my $CONTACT = '[email protected]';
my $RIGHTS = 'USIT/IT-DRIFT/GD/GID, University of Oslo, Norway';
my $VERSION = '2.7.25';
my $VERSION = '2.7.26';

# Usage text
my $USAGE = <<"END_USAGE";
Expand Down
2 changes: 1 addition & 1 deletion client/windows/nivlheim_client.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ param(
[bool]$nosleep = $false
)

Set-Variable version -option Constant -value "2.7.25"
Set-Variable version -option Constant -value "2.7.26"
Set-Variable useragent -option Constant -value "NivlheimPowershellClient/$version"
Set-PSDebug -strict
Set-StrictMode -version "Latest" # http://technet.microsoft.com/en-us/library/hh849692.aspx
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
nivlheim (2.7.26-1) buster; urgency=low

* Fixed a bug when clients post files from a IPv6 address

-- Marius Pedersen <[email protected]>

nivlheim (2.7.25-1) buster; urgency=low

* Changes in the server code (cgi scripts rewritten in Go)
Expand Down
4 changes: 2 additions & 2 deletions server/client_CA_cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ if [[ $ACTIVATE -eq 1 ]]; then
mv new_nivlheimca.csr nivlheimca.csr
mv new_nivlheimca.crt nivlheimca.crt
# signal httpd to gracefully restart, if it is running
if [[ -f /var/run/httpd/httpd.pid ]]; then
kill -usr1 `cat /var/run/httpd/httpd.pid`
if [[ -f /var/run/apache2/httpd.pid ]]; then
kill -usr1 `cat /var/run/apache2/httpd.pid`
fi
else
echo "There's no new CA certificate to activate"
Expand Down
2 changes: 1 addition & 1 deletion server/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fi
function sigterm()
{
echo "Received SIGTERM"
kill -term `cat /var/run/httpd/httpd.pid`
kill -term `cat /var/run/apache2/httpd.pid`
}
trap sigterm SIGTERM

Expand Down
Loading