diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 0000000..7079b14 --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,66 @@ +name: Analyze +on: + push: + branches: + - master + - dev + pull_request: + types: [opened, synchronize, reopened] +jobs: + blacklist: + name: Blacklist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Compare regular expressions with samples + run: | + ./misc/blacklist/helper.py --test + + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + env: + SONAR_SCANNER_VERSION: 4.7.0.2747 + SONAR_SERVER_URL: "https://sonarcloud.io" + BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Download and set up sonar-scanner + env: + SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip + run: | + mkdir -p $HOME/.sonar + curl -sSLo $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }} + unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ + echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH + - name: Download and set up build-wrapper + env: + BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip + run: | + curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip ${{ env.BUILD_WRAPPER_DOWNLOAD_URL }} + unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ + echo "$HOME/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH + - name: Install dependencies + run: | + sudo apt-get install -y build-essential cmake libssl-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev libboost-regex-dev libboost-test-dev libasio-dev libjsoncpp-dev libcrypto++-dev libdbi-dev + - name: Run cmake + run: | + cmake . + - name: Run unit tests + run: | + make tests && make test + - name: Run build-wrapper + run: | + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make shadowd + - name: Run sonar-scanner + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sonar-scanner --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" -Dproject.settings=.sonarcloud.properties -Dsonar.cfamily.cache.enabled=false -Dsonar.cfamily.threads=1 diff --git a/.sonarcloud.properties b/.sonarcloud.properties index 659ed1c..a267dbc 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -3,3 +3,4 @@ sonar.exclusions=misc/*, tests/* sonar.tests=tests sonar.sourceEncoding=UTF-8 sonar.projectKey=zecure_shadowd +sonar.organization=zecure \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 03fee6d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: cpp - -compiler: - - gcc - -addons: - apt: - packages: - - libssl-dev - - libboost-system-dev - - libboost-thread-dev - - libboost-program-options-dev - - libboost-regex-dev - - libboost-test-dev - - libasio-dev - - libjsoncpp-dev - - libcrypto++-dev - - libdbi-dev - sonarcloud: - organization: "zecure" - token: - secure: "sZaYONDYjaqNO2DKEOGTvmimAafCRNnOSgzot/x+Kc4J9EoKKwBNI99p+c/5bQbMuHh+kxxhH9cUdl6V+y/XyxkX9gEJl1Gr8hKacwBlSkiF9jdsTH1N96ttx7txn0w7NcOh1GRwnIQCEcmrUkItEHmnUcNhyCaxUbtfE/nHU/tjEygLG+heWXWl6qwZw+NC8SU+2N3wkx/enB0LPlodjh8dGJgkDMQTzRXu3svEorXcnDwD4KGVnFRYFaVC5OgX7zySycMv2hVAt+Sd/XAJ/89scp46pH/sYIryrDhhiTZodZeBsYlNHhD1dm5kiZ179Pb/GjED2SVQDjUrPdkO6lZWl7lYYfY1+D/a2ORtk+s0twroqV/n6JFWLvmxGBNNFmvU+Nho8Q09rudl1V4yGceX7I0j0VPRJXlezfPWZvakWGQDefpCtpxUIlkvCWOJ7Q9lyGlDMOogBPjZbMW7DF8kOmhU/2QwoZFI7RagTIUZSSYeMRue7b38eE8t4mooR1k6J5pc+XGQj4sXe1BYDUjJaF22gzpy2pzAZDstUx+mj93LNwqSyWu2o+FD1KCSec/zTZ2BTfugKhmkI6lI/9uSG6rH7DTGGKw2Hs+/Bt1oBHWxdES5BbVv4XdzsSz2aPmjRXZJXKuFz/o+QFp6h8KkIF4KokP80qu/pVUD9HA=" - -before_script: - - mkdir build - - cd build - - cmake .. - -script: - - ../misc/blacklist/helper.py --test - - make tests && make test - - build-wrapper-linux-x86-64 --out-dir bw-output make shadowd - - cd .. - - sonar-scanner -Dsonar.cfamily.build-wrapper-output=build/bw-output -Dproject.settings=.sonarcloud.properties -Dsonar.cfamily.cache.enabled=false -Dsonar.cfamily.threads=1 - -os: - - linux - -sudo: required - -dist: focal - -git: - depth: false diff --git a/CMakeLists.txt b/CMakeLists.txt index 51e7e6b..9d774d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,8 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Version set(SHADOWD_MAJOR_VERSION 2) -set(SHADOWD_MINOR_VERSION 1) -set(SHADOWD_PATCH_VERSION 1) +set(SHADOWD_MINOR_VERSION 2) +set(SHADOWD_PATCH_VERSION 0) set(SHADOWD_VERSION ${SHADOWD_MAJOR_VERSION}.${SHADOWD_MINOR_VERSION}.${SHADOWD_PATCH_VERSION} ) diff --git a/Dockerfile b/Dockerfile index cef63eb..cdbb464 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal AS builder +FROM ubuntu:20.04 AS builder RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ build-essential \ @@ -21,7 +21,7 @@ RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=Release .. && \ make shadowd -FROM ubuntu:focal +FROM ubuntu:20.04 MAINTAINER Hendrik Buchwald ENV SHADOWD_ADDRESS 0.0.0.0 EXPOSE 9115 @@ -57,4 +57,4 @@ RUN addgroup \ COPY --from=builder /shadowd/misc/docker/docker-entrypoint.sh / COPY --from=builder /shadowd/build/src/shadowd /usr/bin/shadowd ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["/usr/bin/shadowd", "-c", "/etc/shadowd/shadowd.ini", "-U", "shadowd", "-G", "shadowd"] +CMD ["/usr/bin/shadowd", "-c", "/etc/shadowd/shadowd.ini", "-U", "shadowd", "-G", "shadowd", "-W"] diff --git a/Doxyfile b/Doxyfile index dbdbb5d..3ab1c50 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "Shadow Daemon" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "2.1.1" +PROJECT_NUMBER = "2.2.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 3ad2e0b..f3011c2 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,10 @@ -![Logo](http://shadowd.zecure.org/img/logo_small.png) +![Logo](https://shadowd.zecure.org/img/logo_small.png) -[![Build Status](https://app.travis-ci.com/zecure/shadowd.svg?branch=master)](https://app.travis-ci.com/zecure/shadowd) +[![Build Status](https://github.com/zecure/shadowd/actions/workflows/analyze.yml/badge.svg)](https://github.com/zecure/shadowd/actions/workflows/analyze.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=zecure_shadowd&metric=alert_status)](https://sonarcloud.io/dashboard?id=zecure_shadowd) -**Shadow Daemon** is a collection of tools to **detect**, **record** and **prevent** **attacks** on *web applications*. -Technically speaking, Shadow Daemon is a **web application firewall** that intercepts requests and filters out malicious parameters. -It is a modular system that separates web application, analysis and interface to increase security, flexibility and expandability. - -This is the main component that handles the analysis and storage of requests. +**Shadow Daemon** is a *web application firewall* that intercepts requests at application-level. +This repository contains the main component of Shadow Daemon that handles the analysis and storage of requests. # Documentation For the full documentation please refer to [shadowd.zecure.org](https://shadowd.zecure.org/). diff --git a/include/blacklist.h b/include/blacklist.h index 8b39e93..97b4ba9 100644 --- a/include/blacklist.h +++ b/include/blacklist.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/blacklist_filter.h b/include/blacklist_filter.h index ed801a3..2089ac4 100644 --- a/include/blacklist_filter.h +++ b/include/blacklist_filter.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/blacklist_rule.h b/include/blacklist_rule.h index 780b576..19a9624 100644 --- a/include/blacklist_rule.h +++ b/include/blacklist_rule.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/cache.h b/include/cache.h index 434aa5c..c690eb2 100644 --- a/include/cache.h +++ b/include/cache.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/cached.h b/include/cached.h index 7cf6758..9ed4d45 100644 --- a/include/cached.h +++ b/include/cached.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/config.h b/include/config.h index c690f23..eee0e3f 100644 --- a/include/config.h +++ b/include/config.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/config_exception.h b/include/config_exception.h index 76b0fa5..a38561f 100644 --- a/include/config_exception.h +++ b/include/config_exception.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/connection.h b/include/connection.h index fead7a3..3b964dc 100644 --- a/include/connection.h +++ b/include/connection.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/connection_exception.h b/include/connection_exception.h index ef9881c..45dc1df 100644 --- a/include/connection_exception.h +++ b/include/connection_exception.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/core_exception.h b/include/core_exception.h index 9488b68..f8e3e2a 100644 --- a/include/core_exception.h +++ b/include/core_exception.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/daemon.h b/include/daemon.h index 35cb995..7c8350c 100644 --- a/include/daemon.h +++ b/include/daemon.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/database.h b/include/database.h index f0a2cba..1bcff6e 100644 --- a/include/database.h +++ b/include/database.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -68,11 +68,12 @@ namespace swd { * @param password The database password, originating from the config * @param name The database name, originating from the config * @param encoding The database encoding, originating from the config + * @param wait Retry connecting to the database */ void connect(const std::string& driver, const std::string& host, const std::string& port, const std::string& username, const std::string& password, const std::string& name, - const std::string& encoding); + const std::string& encoding, bool wait); /** * @brief Close the database connection. diff --git a/include/database_exception.h b/include/database_exception.h index 60c6839..9d5f382 100644 --- a/include/database_exception.h +++ b/include/database_exception.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/hash.h b/include/hash.h index a06118b..7c6bcd7 100644 --- a/include/hash.h +++ b/include/hash.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/integrity.h b/include/integrity.h index df91dbd..367b2bb 100644 --- a/include/integrity.h +++ b/include/integrity.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/integrity_rule.h b/include/integrity_rule.h index f1f073a..6751e87 100644 --- a/include/integrity_rule.h +++ b/include/integrity_rule.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/log.h b/include/log.h index d800d52..a15ec45 100644 --- a/include/log.h +++ b/include/log.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/parameter.h b/include/parameter.h index e627c72..99e418d 100644 --- a/include/parameter.h +++ b/include/parameter.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/profile.h b/include/profile.h index 129b362..bb8a713 100644 --- a/include/profile.h +++ b/include/profile.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/reply.h b/include/reply.h index 6ee6fa9..da0235b 100644 --- a/include/reply.h +++ b/include/reply.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/reply_handler.h b/include/reply_handler.h index 772a45d..8af093d 100644 --- a/include/reply_handler.h +++ b/include/reply_handler.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/request.h b/include/request.h index b8ef531..6b18684 100644 --- a/include/request.h +++ b/include/request.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/request_handler.h b/include/request_handler.h index c7827ab..d2d1905 100644 --- a/include/request_handler.h +++ b/include/request_handler.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/request_parser.h b/include/request_parser.h index 4541fb7..f2f1edc 100644 --- a/include/request_parser.h +++ b/include/request_parser.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/server.h b/include/server.h index 906769a..b1a9c7c 100644 --- a/include/server.h +++ b/include/server.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/shadowd.h b/include/shadowd.h index 02b66b0..e2c6d7f 100644 --- a/include/shadowd.h +++ b/include/shadowd.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/shared.h b/include/shared.h index 4e98bbe..11df89f 100644 --- a/include/shared.h +++ b/include/shared.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -34,6 +34,9 @@ #include "build_config.h" +// Avoid collision with std::byte (https://www.cryptopp.com/wiki/Std::byte) +typedef unsigned char byte; + #define STATUS_OK 1 #define STATUS_BAD_REQUEST 2 #define STATUS_BAD_SIGNATURE 3 diff --git a/include/singleton.h b/include/singleton.h index 2765adb..8f0e435 100644 --- a/include/singleton.h +++ b/include/singleton.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/storage.h b/include/storage.h index 2a0152f..1a68de0 100644 --- a/include/storage.h +++ b/include/storage.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/whitelist.h b/include/whitelist.h index 03fcb2b..3fe312a 100644 --- a/include/whitelist.h +++ b/include/whitelist.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/whitelist_filter.h b/include/whitelist_filter.h index f479215..805f0ad 100644 --- a/include/whitelist_filter.h +++ b/include/whitelist_filter.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/include/whitelist_rule.h b/include/whitelist_rule.h index 86dbc16..bea7594 100644 --- a/include/whitelist_rule.h +++ b/include/whitelist_rule.h @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/misc/blacklist/helper.py b/misc/blacklist/helper.py index 9add506..b2882f0 100755 --- a/misc/blacklist/helper.py +++ b/misc/blacklist/helper.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Shadow Daemon -- Web Application Firewall # -# Copyright (C) 2014-2021 Hendrik Buchwald +# Copyright (C) 2014-2022 Hendrik Buchwald # # This file is part of Shadow Daemon. Shadow Daemon is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/misc/docker/docker-entrypoint.sh b/misc/docker/docker-entrypoint.sh index c59271d..5017236 100755 --- a/misc/docker/docker-entrypoint.sh +++ b/misc/docker/docker-entrypoint.sh @@ -3,41 +3,33 @@ set -e SHADOWD_CONFIG="/etc/shadowd/shadowd.ini" -cat /dev/null > $SHADOWD_CONFIG +remove_newline () { + echo "$1" | sed -e 's/[\r\n]//g' +} + +reset_config () { + cat /dev/null > $SHADOWD_CONFIG +} + +set_value () { + CONFIG_KEY=$(remove_newline $1) + CONFIG_VALUE=$(remove_newline $2) + + if [ -n "$CONFIG_VALUE" ]; then + echo "$CONFIG_KEY=$CONFIG_VALUE" >> $SHADOWD_CONFIG + fi +} + +reset_config +set_value address $SHADOWD_ADDRESS +set_value threads $SHADOWD_THREADS +set_value db-driver $SHADOWD_DB_DRIVER +set_value db-host $SHADOWD_DB_HOST +set_value db-port $SHADOWD_DB_PORT +set_value db-name $SHADOWD_DB_NAME +set_value db-user $SHADOWD_DB_USER +set_value db-password $SHADOWD_DB_PASSWORD -if [ -n "$SHADOWD_ADDRESS" ]; then - echo "address=$SHADOWD_ADDRESS" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_THREADS" ]; then - echo "threads=$SHADOWD_THREADS" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_DRIVER" ]; then - echo "db-driver=$SHADOWD_DB_DRIVER" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_HOST" ]; then - echo "db-host=$SHADOWD_DB_HOST" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_PORT" ]; then - echo "db-port=$SHADOWD_DB_PORT" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_NAME" ]; then - echo "db-name=$SHADOWD_DB_NAME" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_USER" ]; then - echo "db-user=$SHADOWD_DB_USER" >> $SHADOWD_CONFIG -fi - -if [ -n "$SHADOWD_DB_PASSWORD" ]; then - echo "db-password=$SHADOWD_DB_PASSWORD" >> $SHADOWD_CONFIG -fi - -sleep 15 echo "Starting command $@" exec "$@" diff --git a/misc/man/shadowd.1 b/misc/man/shadowd.1 index 2fc2ca6..7616642 100644 --- a/misc/man/shadowd.1 +++ b/misc/man/shadowd.1 @@ -79,6 +79,30 @@ Set the maximum length of parameter paths. .TP .B "\-\-max-length-value (-1)" Set the maximum length of parameter values. +.TP +.B "\-W, \-\-db-wait" +Wait for database. +.TP +.B "\-\-db-driver (pgsql)" +Set the database driver. +.TP +.B "\-\-db-host (127.0.0.1)" +Set the database host. +.TP +.B "\-\-db-port (5432)" +Set the database port. +.TP +.B "\-\-db-name (shadowd)" +Set the database name. +.TP +.B "\-\-db-user (shadowd)" +Set the database user. +.TP +.B "\-\-db-password " +Set the database password. +.TP +.B "\-\-db-encoding (UTF-8)" +Set the database encoding. .SH "REQUIREMENTS" A set up database is required to use shadowd. .SH "LICENSE" diff --git a/src/blacklist.cpp b/src/blacklist.cpp index 9983f4a..552f215 100644 --- a/src/blacklist.cpp +++ b/src/blacklist.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -49,7 +49,7 @@ void swd::blacklist::scan(const swd::request_ptr& request) const { /* If there is catastrophic backtracking boost throws an exception. */ try { /* Add pointers to all filters that match to the parameter. */ - if (filter->matches(parameter->get_value())) { + if (filter->matches(parameter->get_value()) || filter->matches(parameter->get_path())) { parameter->add_blacklist_filter(filter); } } catch (...) { diff --git a/src/blacklist_filter.cpp b/src/blacklist_filter.cpp index 94cad78..3baecb2 100644 --- a/src/blacklist_filter.cpp +++ b/src/blacklist_filter.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/blacklist_rule.cpp b/src/blacklist_rule.cpp index 490614b..2ea9ddf 100644 --- a/src/blacklist_rule.cpp +++ b/src/blacklist_rule.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/cache.cpp b/src/cache.cpp index 3e21929..8875013 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/config.cpp b/src/config.cpp index c0a2f04..f39b5a4 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -72,18 +72,24 @@ swd::config::config() : ("max-length-value", po::value()->default_value(-1), "max length of parameter values"); od_database_.add_options() - ("db-driver", po::value()->default_value("pgsql")) - ("db-host", po::value()->default_value("127.0.0.1")) - ("db-port", po::value()->default_value("5432")) - ("db-name", po::value()->default_value("shadowd")) - ("db-user", po::value()->default_value("shadowd")) - ("db-password", po::value()->default_value("")) - ("db-encoding", po::value()->default_value("UTF-8")); + ("db-wait,W", "wait for database") + ("db-driver", po::value()->default_value("pgsql"), "database driver") + ("db-host", po::value()->default_value("127.0.0.1"), "database host") + ("db-port", po::value()->default_value("5432"), "database port") + ("db-name", po::value()->default_value("shadowd"), "database name") + ("db-user", po::value()->default_value("shadowd"), "database user") + ("db-password", po::value()->default_value(""), "database password") + ("db-encoding", po::value()->default_value("UTF-8"), "database encoding"); } void swd::config::parse_command_line(int argc, char** argv) { po::options_description combination; - combination.add(od_generic_).add(od_server_).add(od_daemon_).add(od_security_); + combination + .add(od_generic_) + .add(od_server_) + .add(od_daemon_) + .add(od_security_) + .add(od_database_); try { po::store(po::command_line_parser(argc, argv).options(combination).run(), vm_); diff --git a/src/config_exception.cpp b/src/config_exception.cpp index b220385..3547ccf 100644 --- a/src/config_exception.cpp +++ b/src/config_exception.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/connection.cpp b/src/connection.cpp index 0f331a6..a27589c 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/connection_exception.cpp b/src/connection_exception.cpp index 251a12f..68b72e0 100644 --- a/src/connection_exception.cpp +++ b/src/connection_exception.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/core_exception.cpp b/src/core_exception.cpp index d6f6068..97a4aa4 100644 --- a/src/core_exception.cpp +++ b/src/core_exception.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/daemon.cpp b/src/daemon.cpp index 882a89d..69c285a 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/database.cpp b/src/database.cpp index 72c55d5..0cb24e8 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -30,6 +30,8 @@ */ #include +#include +#include #include "database.h" #include "log.h" @@ -38,7 +40,7 @@ void swd::database::connect(const std::string& driver, const std::string& host, const std::string& port, const std::string& username, const std::string& password, - const std::string& name, const std::string& encoding) { + const std::string& name, const std::string& encoding, bool wait) { #if defined(HAVE_DBI_NEW) dbi_initialize_r(nullptr, &instance_); conn_ = dbi_conn_new_r(driver.c_str(), instance_); @@ -54,10 +56,25 @@ void swd::database::connect(const std::string& driver, const std::string& host, dbi_conn_set_option(conn_, "dbname", name.c_str()); dbi_conn_set_option(conn_, "encoding", encoding.c_str()); - /* If the initial connection can not be established the process is shut down. */ - if (dbi_conn_connect(conn_) < 0) { - throw swd::exceptions::core_exception("Can't connect to database server"); - } + bool retry = true; + int attempt = 0; + do { + if (dbi_conn_connect(conn_) < 0) { + if (!wait) { + throw swd::exceptions::core_exception("Can't connect to database server"); + } + + attempt++; + int sleep_time = attempt + 2; + swd::log::i()->send( + swd::uncritical_error, + "Can't connect to database server, retrying in " + std::to_string(sleep_time) + " seconds" + ); + std::this_thread::sleep_for(std::chrono::seconds(sleep_time)); + } else { + retry = false; + } + } while (retry); } void swd::database::disconnect() { diff --git a/src/database_exception.cpp b/src/database_exception.cpp index c0818e4..ac7c1aa 100644 --- a/src/database_exception.cpp +++ b/src/database_exception.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/hash.cpp b/src/hash.cpp index c86fc99..269c6cf 100644 --- a/src/hash.cpp +++ b/src/hash.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/integrity.cpp b/src/integrity.cpp index a5c6f3a..84e5308 100644 --- a/src/integrity.cpp +++ b/src/integrity.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/integrity_rule.cpp b/src/integrity_rule.cpp index f111db9..a44054d 100644 --- a/src/integrity_rule.cpp +++ b/src/integrity_rule.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/log.cpp b/src/log.cpp index b20be80..a7b97dd 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/parameter.cpp b/src/parameter.cpp index 6d5cb28..6c1f024 100644 --- a/src/parameter.cpp +++ b/src/parameter.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/profile.cpp b/src/profile.cpp index bcf3d96..8c03125 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/reply.cpp b/src/reply.cpp index f442319..1cc1618 100644 --- a/src/reply.cpp +++ b/src/reply.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/reply_handler.cpp b/src/reply_handler.cpp index 82a1163..047ebe9 100644 --- a/src/reply_handler.cpp +++ b/src/reply_handler.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/request.cpp b/src/request.cpp index c696cb1..6a50252 100644 --- a/src/request.cpp +++ b/src/request.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/request_handler.cpp b/src/request_handler.cpp index 3caad0a..44f54f8 100644 --- a/src/request_handler.cpp +++ b/src/request_handler.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -118,11 +118,11 @@ bool swd::request_handler::decode() const { request_->set_client_ip(client_ip.asString()); - /* The same is true for the caller, the target script on the observed system. */ + /* The target script on the observed system. Should not be empty but might in rare cases. */ Json::Value caller = root["caller"]; if (!caller) { - return false; + caller = ""; } request_->set_caller(caller.asString()); diff --git a/src/request_parser.cpp b/src/request_parser.cpp index d0cc6c3..dfdb7c9 100644 --- a/src/request_parser.cpp +++ b/src/request_parser.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/server.cpp b/src/server.cpp index 5ee0ced..4f1d6d5 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/shadowd.cpp b/src/shadowd.cpp index 3c8e220..bdae82b 100644 --- a/src/shadowd.cpp +++ b/src/shadowd.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -99,7 +99,8 @@ void swd::shadowd::init(int argc, char** argv) { swd::config::i()->get("db-user"), swd::config::i()->get("db-password"), swd::config::i()->get("db-name"), - swd::config::i()->get("db-encoding") + swd::config::i()->get("db-encoding"), + swd::config::i()->defined("db-wait") ); /** diff --git a/src/storage.cpp b/src/storage.cpp index b91124c..53bf7f7 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/whitelist.cpp b/src/whitelist.cpp index 948e219..bbf91ee 100644 --- a/src/whitelist.cpp +++ b/src/whitelist.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/whitelist_filter.cpp b/src/whitelist_filter.cpp index efc6e6d..0fc4ba0 100644 --- a/src/whitelist_filter.cpp +++ b/src/whitelist_filter.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/whitelist_rule.cpp b/src/whitelist_rule.cpp index a03afd1..b5ecb25 100644 --- a/src/whitelist_rule.cpp +++ b/src/whitelist_rule.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/blacklist_filter_test.cpp b/tests/blacklist_filter_test.cpp index 034d462..7f97537 100644 --- a/tests/blacklist_filter_test.cpp +++ b/tests/blacklist_filter_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/blacklist_test.cpp b/tests/blacklist_test.cpp index e53cceb..8ea3193 100644 --- a/tests/blacklist_test.cpp +++ b/tests/blacklist_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/integrity_rule_test.cpp b/tests/integrity_rule_test.cpp index 8dd7b07..c048b71 100644 --- a/tests/integrity_rule_test.cpp +++ b/tests/integrity_rule_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/integrity_test.cpp b/tests/integrity_test.cpp index aec37ec..3016ecd 100644 --- a/tests/integrity_test.cpp +++ b/tests/integrity_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/parameter_test.cpp b/tests/parameter_test.cpp index 1b4ef1d..8bb4d59 100644 --- a/tests/parameter_test.cpp +++ b/tests/parameter_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/reply_handler_test.cpp b/tests/reply_handler_test.cpp index eeb5eab..9e5d107 100644 --- a/tests/reply_handler_test.cpp +++ b/tests/reply_handler_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/request_handler_test.cpp b/tests/request_handler_test.cpp index 6f67adc..4b69520 100644 --- a/tests/request_handler_test.cpp +++ b/tests/request_handler_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/request_parser_test.cpp b/tests/request_parser_test.cpp index 0d343df..2b07aa8 100644 --- a/tests/request_parser_test.cpp +++ b/tests/request_parser_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/request_test.cpp b/tests/request_test.cpp index d6cc90d..6524df1 100644 --- a/tests/request_test.cpp +++ b/tests/request_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/shadowd_tests.cpp b/tests/shadowd_tests.cpp index 545365f..61ce0a3 100644 --- a/tests/shadowd_tests.cpp +++ b/tests/shadowd_tests.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/whitelist_filter_test.cpp b/tests/whitelist_filter_test.cpp index 9f640c7..b096c83 100644 --- a/tests/whitelist_filter_test.cpp +++ b/tests/whitelist_filter_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/whitelist_rule_test.cpp b/tests/whitelist_rule_test.cpp index 48605d5..f62df7b 100644 --- a/tests/whitelist_rule_test.cpp +++ b/tests/whitelist_rule_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tests/whitelist_test.cpp b/tests/whitelist_test.cpp index 233a068..cb0babd 100644 --- a/tests/whitelist_test.cpp +++ b/tests/whitelist_test.cpp @@ -1,7 +1,7 @@ /** * Shadow Daemon -- Web Application Firewall * - * Copyright (C) 2014-2021 Hendrik Buchwald + * Copyright (C) 2014-2022 Hendrik Buchwald * * This file is part of Shadow Daemon. Shadow Daemon is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public