Commit Graph

45 Commits (master)

Author SHA1 Message Date
Andy Scherzinger 5c49a54801
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
7 days ago
Faraz Samapoor 90035e98c1 Update core/Command/Encryption/DecryptAll.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
12 months ago
Faraz Samapoor 9c2abae59c Update core/Command/Encryption/EncryptAll.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
12 months ago
Faraz Samapoor bcfbcbb91c Moves single constructor parameters to new lines.
Based on:
https://github.com/nextcloud/server/pull/38764#discussion_r1227630895

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
12 months ago
Faraz Samapoor 2ace19fc54 Fixes php-cs error.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
12 months ago
Faraz Samapoor f9a9ad50c3 Uses PHP8's constructor property promotion in core/Command/Encryption classes.
Signed-off-by: Faraz Samapoor <fsa@adlas.at>
12 months ago
Faraz Samapoor 8f4b20aaa1
Refactors core/Command/Encryption/Enable.php to improve code readability.
Improves the readability of the "execute" method by using early returns and reducing the code indentation.

Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
1 year ago
Carl Schwan b70c6a128f Update core to PHP 7.4 standard
- Typed properties
- Port to LoggerInterface

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma 5340ab3a75
New SSE key format
* Encrypt the keys with the instance secret
* Store them as json (so we can add other things if needed)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Joas Schilling ab21d69903
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Ruben Homs 98047e8c1c
Stop decryption when maintenance mode is enabled, fixes #8311
Signed-off-by: Ruben Homs <ruben@homs.codes>
5 years ago
Joas Schilling 0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Evgeny Golyshev ec2f02f4a0 Check if TTY is invalid in encryption:encrypt-all and encryption:decrypt-all
Signed-off-by: Evgeny Golyshev <eugulixes@gmail.com>
6 years ago
Bjoern Schiessle 9259b8a90e
s/ownCloud/Nextcloud
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
6 years ago
Bjoern Schiessle 31397debaf
fix check and improve error message
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
6 years ago
Joas Schilling 5080080a36
Anything but true means it failed
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
Morris Jobke a661f043e1
Remove unneeded semicolon and parentheses
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 0f2ee20885
ownC -> Nextc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Matthew Setter d4058b73c2
Update the occ:encrypt-all prompt
The message isn't as clear, nor as succinct, as it could be.
Given that, this commit seeks to address both those points.
This commit was prompted by https://github.com/owncloud/documentation/pull/2835.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 9533f4e5ed
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since
we heavily rely on WebDAV and OCS also in the web UI it's basically useless.
An admin only sees a broken interface and can't even change any settings nor
sees any files. Also sharing is not possible.

As this is at least the case since Nextcloud 9 and we haven't received any
reports for this it seems that this feature is not used at all so I removed it.

The encryption commands now rely on the well tested maintenance mode.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Marius Blüm 46edb4e1a7
It's Nextcloud
Signed-off-by: Marius Blüm <marius@lineone.io>
8 years ago
Joas Schilling ba87db3fcc
Fix others 8 years ago
Vincent Petry f062b62f03 Keep encryption enabled if decrypting for single user
When decrypting all files of a single user, the admin usually does not
intend encryption to be suddenly disabled for everyone. This fix
reenables encryption after decrypting for a single user.

Decrypting for all users will still disable encryption globally.
8 years ago
Joas Schilling 4c26abe228 Fix the FIXME (#25022) 8 years ago
Vincent Petry 9b6125e49b Merge pull request #24992 from owncloud/fix_decrypt_message
Fix Decrypt message via occ
8 years ago
Sergio Bertolín 67c9e598ae Fixed reviews 8 years ago
Joas Schilling d4ba982131
Allow to decrypt user '0' files only 8 years ago
davitol f9b3865093 Comments fixed 8 years ago
davitol eaeb5d606d Fix Decrypt message via occ 8 years ago
Lukas Reschke aba539703c
Update license headers 8 years ago
Lukas Reschke a4b19a5b1e
Rename files to be PSR-4 compliant 8 years ago