Joas Schilling
ba87db3fcc
Fix others
10 years ago
Lukas Reschke
aba539703c
Update license headers
10 years ago
Roeland Jago Douma
dedf392751
Move \OC\Files to PSR-4
10 years ago
Lukas Reschke
c353d51810
Remove Scrutinizer Auto Fixer
10 years ago
Lukas Reschke
933f60e314
Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
10 years ago
Scrutinizer Auto-Fixer
0d0151a3e1
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
10 years ago
Lukas Reschke
3badf5caf5
Use number of chunk for HMAC as well
Prevents switching single blocks within the encrypted file.
10 years ago
Björn Schießle
9bb97c714b
fixing unit tests
10 years ago
Björn Schießle
cf3a8f274f
make it backward compatible to work with signed and un-signed files
10 years ago
Thomas Müller
682821c71e
Happy new year!
10 years ago
Roeland Jago Douma
cfdf2b9976
Fix overriding function from 3rdparty warning
Fixes #20648
10 years ago
Roeland Jago Douma
ca6bd5cacd
Follow the interface again
10 years ago
Morris Jobke
b945d71384
update licence headers via script
11 years ago
Morris Jobke
f63915d0c8
update license headers and authors
11 years ago
jknockaert
a577e723b0
flush() comments + perf opt
11 years ago
jknockaert
bf6151e799
fix calculation of $count, $count is always 8129 so we need to check this
against the unencrypted file size
11 years ago
Bjoern Schiessle
5a20edac82
test to simulate a non-seekable stream wrapper
11 years ago
jknockaert
fb51880a4a
encrypted filesize calculation in flush()
11 years ago
jknockaert
2834971a77
fix #16356
11 years ago
Vincent Petry
9d3d7ec659
Small perf tweak in strlen loop
11 years ago
jknockaert
f5415653fd
fix #15973
Rework of stream_seek handling; there where basically two bugs: 1. seeking to the end of the current file would fail (with SEEK_SET); and 2. if seeking to an undefined position (outside 0,unencryptedSize) then newPosition was not defined. I used the opportunity to simplify the code.
11 years ago
Bjoern Schiessle
27683f9442
fall back to the ownCloud default encryption module and aes128 if we read a encrypted file without a header
11 years ago
Bjoern Schiessle
9a5783b284
fix unit tests
11 years ago
jknockaert
49df8ef525
Update encryption.php
11 years ago
jknockaert
238302ee7d
fixed name
11 years ago
jknockaert
1756562501
Update encryption.php
11 years ago
jknockaert
735f6cc037
fix encryption header error
When moving back the pointer to position 0 (using stream_seek), the pointer on the encrypted stream will be moved to the position immediately after the header. Reading the header again (invoked by stream_read) will cause an error, writing the header again (invoked by stream_write) will corrupt the file. Reading/writing the header should therefore happen when opening the file rather than upon read or write. Note that a side-effect of this PR is that empty files will still get an encryption header; I think that is OK, but it is different from how it was originally implemented.
11 years ago
Bjoern Schiessle
19e8c4fcb1
get dirname from sharePath
11 years ago
Vincent Petry
76dad297ff
Fix encryption feof to not return too early
This is because stream_read will pre-cache the next block which causes
feof($this->source) to return true prematurely. So we cannot rely on it.
Fixed encryption stream wrapper unit tests to actually simulate 6k/8k
blocks to make sure we cover the matching logic.
Added two data files with 8192 and 8193 bytes.
11 years ago
Bjoern Schiessle
7fe0e09d14
set size and unencrypted size to zero on fopen
11 years ago
Bjoern Schiessle
67500d5f2f
if we start writing a file from the beginning, size should start by zero; result of floor needs to be casted to int in order to compare it with ->size
11 years ago
Thomas Müller
a4483243ac
fixing license headers - encryption code related
11 years ago
Thomas Müller
69e95531f8
comment change as it broke unit tests
11 years ago
jknockaert
ff16e3dbff
Adjusting count on read
11 years ago
jknockaert
02404a6a8c
Fixing encryption stream wrapper seek - thanks @jknockaert
11 years ago
Thomas Müller
8ffa6db110
fixing unit tests for stream wrapper
11 years ago
Thomas Müller
cac83642f2
Finally fixing encryption with public share
11 years ago
Bjoern Schiessle
e4895bda01
add helper class accessible for encryption modules to ask for a list of users with access to a file, needed to apply the recovery key to all files
11 years ago
Bjoern Schiessle
0eee3a2618
remove unencrypted_size from the cache, size will contain the unencrypted size
11 years ago
Thomas Müller
d185761d31
initializing some variables + update size after writing the headers
11 years ago
Thomas Müller
4441835d18
https://github.com/owncloud/core/pull/15305#discussion_r27382305
Conflicts:
lib/private/files/stream/encryption.php
11 years ago
Thomas Müller
90487384f7
initializing some variables
11 years ago
Bjoern Schiessle
0c48b069ba
call end() before closing the file
11 years ago
Thomas Müller
498625ea3a
adding unit tests for stream wrapper
11 years ago
jknockaert
3e6eb28ee3
Applying diff as of https://github.com/owncloud/core/pull/15303
11 years ago
Bjoern Schiessle
ff9c85ce60
implement basic encryption functionallity in core to enable multiple encryption modules
11 years ago