summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 93e1bb3)
raw | patch | inline | side by side (parent: 93e1bb3)
author | Eric Wertz <ericwertz@Erics-MacBook-Pro.local> | |
Fri, 30 May 2025 23:49:49 +0000 (19:49 -0400) | ||
committer | Eric Wertz <ericwertz@Erics-MacBook-Pro.local> | |
Fri, 30 May 2025 23:49:49 +0000 (19:49 -0400) |
backend/HTTPResponse.cpp | patch | blob | history | |
backend/User.cpp | patch | blob | history |
index b0e997134a2d336a50659236da387a574617a674..c7b43da6890bce8e697c9a1c4a2c1ecc7ff4d23d 100644 (file)
--- a/backend/HTTPResponse.cpp
+++ b/backend/HTTPResponse.cpp
if (_wwwDir == "")
{
char resolved_path[PATH_MAX];
- realpath("www/", resolved_path);
+ if( realpath("www/", resolved_path) == NULL )
+ {
+ die("Failed to resolve path");
+ }
_wwwDir = std::string(resolved_path) + "/";
}
}
diff --git a/backend/User.cpp b/backend/User.cpp
index 9bc082c8aed8ac59c840bc459f292174b28dba15..04c4eb0956eb162dde9590c2c2189515b1a9bade 100644 (file)
--- a/backend/User.cpp
+++ b/backend/User.cpp
#include <string>
#include <sstream> // Required for std::istringstream
#include <stdexcept>
+#include <cstring>
#define SESSION_ID_LENGTH 32