diff --git a/Makefile b/Makefile index 3324160..9960bf3 100644 --- a/Makefile +++ b/Makefile @@ -11,22 +11,22 @@ SOURCES=$(wildcard *.cpp) SOURCES+=$(wildcard gateway/*.cpp) SOURCES+=$(wildcard handlers/*.cpp) SOURCES+=$(wildcard database/*.cpp) -SOURCES+=$(wildcard cache/*.cpp) -SOURCES+=$(wildcard sandbox/*.cpp) +SOURCES+=$(wildcard cache/*.cpp) +SOURCES+=$(wildcard sandbox/*.cpp) HEADERS=$(wildcard *.h) HEADERS+=$(wildcard gateway/*.h) HEADERS+=$(wildcard handlers/*.h) HEADERS+=$(wildcard database/*.h) -HEADERS+=$(wildcard cache/*.h) -HEADERS+=$(wildcard sandbox/*.h) +HEADERS+=$(wildcard cache/*.h) +HEADERS+=$(wildcard sandbox/*.h) OBJECTS=$(patsubst %.cpp, %.o, $(SOURCES)) WIKIOBJECTS=$(filter-out test.o, $(OBJECTS)) TESTOBJECTS=$(filter-out qswiki.o, $(OBJECTS)) -DEPENDS = ${WIKIOBJECTS:.o=.d} --include ${DEPENDS} +DEPENDS = ${WIKIOBJECTS:.o=.d} +-include ${DEPENDS} # Points to the root of Google Test, relative to where this file is. # Remember to tweak this if you move this file. @@ -43,18 +43,18 @@ GTEST_OBJECTS=$(filter-out qswiki.o, $(WIKIOBJECTS)) release: CXXFLAGS=$(RELEASE_CXXFLAGS) release: qswiki qswiki: $(WIKIOBJECTS) - $(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I database/hdr -o qswiki + $(CXX) $(WIKIOBJECTS) ${LDFLAGS} -I database/hdr -o qswiki test: $(TESTOBJECTS) $(CXX) $(TESTOBJECTS) ${LDFLAGS} -o test gtest: $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS) $(CXX) -o gtest $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS) $(GTEST_CXXFLAGS) $(GTEST_DIR)/src/gtest_main.cc $(GTEST_DIR)/src/gtest-all.cc $(GTEST_LDFLAGS) - + %.o:%.cpp $(CXX) ${CXXFLAGS} ${LDFLAGS} -I database/hdr -c -o $@ $< clean: rm -f $(OBJECTS) $(DEPENDS) - + diff --git a/handlers/handlerpageview.cpp b/handlers/handlerpageview.cpp index 0a280b2..cc60966 100644 --- a/handlers/handlerpageview.cpp +++ b/handlers/handlerpageview.cpp @@ -69,7 +69,7 @@ std::string HandlerPageView::createIndexContent(IParser &parser, std::string con Response HandlerPageView::handleRequest(PageDao &pageDao, std::string pagename, const Request &r) -{ +{ std::string revisionparam = r.get("revision"); unsigned int revisionid=0; diff --git a/sandbox/sandbox-linux.cpp b/sandbox/sandbox-linux.cpp index 60a42ed..633973e 100644 --- a/sandbox/sandbox-linux.cpp +++ b/sandbox/sandbox-linux.cpp @@ -175,7 +175,7 @@ bool SandboxLinux::enableForInit() { umask(0027); - //TODO. there is execv for SPARC. Sigh... + //TODO. there is execv for SPARC. Sigh... if(!seccomp_blacklist({ SCMP_SYS(execveat), SCMP_SYS(execve) })) { Logger::error() << "Failed to install blacklisting seccomp filter"; diff --git a/sandbox/sandbox.h b/sandbox/sandbox.h index 91a8b3e..1572e7b 100644 --- a/sandbox/sandbox.h +++ b/sandbox/sandbox.h @@ -20,7 +20,7 @@ public: /* Activated after we have acquired resources (bound to ports etc.) - * + * * This should allow us to further restrcit the process */ virtual bool enableForWorker() = 0; }; diff --git a/template/quitesimple/admin_register b/template/quitesimple/admin_register index bb18295..703cfc1 100644 --- a/template/quitesimple/admin_register +++ b/template/quitesimple/admin_register @@ -1,7 +1,7 @@ {qswiki:include:general_header}

Login

-Register a new user +Register a new user
Username:
Password:
diff --git a/template/quitesimple/general_header b/template/quitesimple/general_header index c23fc1b..4d2bb59 100644 --- a/template/quitesimple/general_header +++ b/template/quitesimple/general_header @@ -14,7 +14,7 @@
  • All pages
  • All categories
  • - +
    diff --git a/template/quitesimple/js_session_refresh b/template/quitesimple/js_session_refresh index 287f6d9..b7803d5 100644 --- a/template/quitesimple/js_session_refresh +++ b/template/quitesimple/js_session_refresh @@ -1,5 +1,5 @@ -function refreshSession() -{ +function refreshSession() +{ fetch(new Request("{qswiki:config:refreshsessionurl}")); -} +} setInterval(refreshSession, 60*2*1000); diff --git a/template/quitesimple/page_header b/template/quitesimple/page_header index ca87bfe..7e1ff90 100644 --- a/template/quitesimple/page_header +++ b/template/quitesimple/page_header @@ -14,11 +14,11 @@
  • All pages
  • All categories
  • - + - + diff --git a/template/quitesimple/style.css b/template/quitesimple/style.css index 5d30a09..2c85da9 100644 --- a/template/quitesimple/style.css +++ b/template/quitesimple/style.css @@ -29,7 +29,7 @@ h1, h2, h3 nav { padding: 0px; - margin: 0px; + margin: 0px; display: flex; background-color: #062463; justify-content: space-between; @@ -92,7 +92,7 @@ a:hover { background-color: #062463; color: white; - + } #content @@ -137,7 +137,7 @@ list-style-type: none; { background-color: #062463; color: white; - + } footer diff --git a/tests/utils.cpp b/tests/utils.cpp index ac5e1b1..83ce03a 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -32,7 +32,7 @@ TEST(Utils, hasKey) { ASSERT_TRUE(utils::hasKey(testmap, std::string { "test2"})); ASSERT_FALSE(utils::hasKey(testmap, std::string { "testthere" })); ASSERT_FALSE(utils::hasKey(testmap, std::string { })); - + } TEST(Utils, urldecode) diff --git a/utils.cpp b/utils.cpp index 4c8be10..d634832 100644 --- a/utils.cpp +++ b/utils.cpp @@ -30,7 +30,7 @@ SOFTWARE. //TODO: instead of returning vector maybe provide an iterator version too. -//TODO: % may not be necessary (was in C version just to be sure against format string attacks +//TODO: % may not be necessary (was in C version just to be sure against format string attacks //TODO: hopefully not too slow looking up every character here: const std::map replacements = { {'<', "<"}, {'>', "gt;"}, { '\"', """ }, { '%', "%" }}; std::string utils::html_xss(std::string_view str) @@ -62,9 +62,9 @@ std::string utils::urldecode(std::string_view str) char c = str[i]; if(c == '%' && (size-i>1)) { - char h[3]; - h[0] = str[i+1]; - h[1] = str[i+2]; + char h[3]; + h[0] = str[i+1]; + h[1] = str[i+2]; h[2] = 0; if(std::isxdigit(h[0]) && std::isxdigit(h[1])) {