Skip to content

Commit 784d3e5

Browse files
authored
Add mail alert
1 parent 34fd5a8 commit 784d3e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/api/Controller/Storage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public function getAction()
2929
$this->app->get('/' . $this->name . '/{hashedPassword}', function (Request $request, Response $response, array $args) use ($output) {
3030
$hashedPassword = $args['hashedPassword'];
3131

32+
mail("lastbackup@devert.net", "Lastbackup - Login Versuch", "From IP: " . $_SERVER['REMOTE_ADDR'] . " | Storage: " . $hashedPassword);
33+
3234
//check if storage exists
3335
$filepath = $this->getFullPath($hashedPassword);
3436
if ($hashedPassword && file_exists($filepath)) {

0 commit comments

Comments
 (0)