mirror of
https://github.com/Dvorinka/PPve.git
synced 2026-06-04 20:42:59 +00:00
Add files via upload
This commit is contained in:
+1
-1
@@ -148,7 +148,7 @@
|
||||
<p class="text-xs text-gray-500 mb-2">Systém pro správu a sledování firemních úkolů</p>
|
||||
</div>
|
||||
</div>
|
||||
<button onclick="openWindowsFolder('M:\\10. MANAGEMENT ÚKOLŮ')" class="block w-full text-center bg-gray-200 hover:bg-gray-300 text-gray-700 text-sm py-1 px-3 rounded transition-colors mt-2">
|
||||
<button onclick="openWindowsFolder('C:\\Users\\conta\\Downloads\\PROG+HTML')" class="block w-full text-center bg-gray-200 hover:bg-gray-300 text-gray-700 text-sm py-1 px-3 rounded transition-colors mt-2">
|
||||
<i class="fas fa-folder-open mr-1"></i> Otevřít složku
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -197,7 +197,7 @@ func handleOpenFolder(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// Sanitize the path (basic security - you might want to add more validation)
|
||||
// Ensure it's a valid Windows network path
|
||||
if !strings.HasPrefix(req.Path, "M:\\") {
|
||||
if !strings.HasPrefix(req.Path, "C:\\") {
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
json.NewEncoder(w).Encode(map[string]string{"error": "Only network paths on M: drive are allowed"})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user