-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate race conditions; verify hashes to prevent TOCTOU
- Loading branch information
1 parent
176e4c7
commit e8c3e3b
Showing
9 changed files
with
647 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
namespace ParagonIE\Halite\Alerts; | ||
|
||
class FileModified extends HaliteAlert | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
namespace ParagonIE\Halite\Alerts; | ||
|
||
class InvalidType extends HaliteAlert | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace ParagonIE\Halite\Contract; | ||
|
||
/** | ||
* | ||
*/ | ||
interface StreamInterface | ||
{ | ||
/** | ||
* Read from a stream; prevent partial reads | ||
* | ||
* @param int $num | ||
* @return string | ||
* @throws FileAlert\AccessDenied | ||
*/ | ||
public function readBytes($num); | ||
|
||
/** | ||
* Write to a stream; prevent partial writes | ||
* | ||
* @param string $buf | ||
* @param int $num (number of bytes) | ||
* @throws FileAlert\AccessDenied | ||
*/ | ||
public function writeBytes($buf, $num = null); | ||
} |
Oops, something went wrong.