@@ -27,24 +27,24 @@ |
||
| 27 | 27 | namespace OC\App\AppStore\Bundles; |
| 28 | 28 | |
| 29 | 29 | class HubBundle extends Bundle { |
| 30 | - public function getName() { |
|
| 31 | - return $this->l10n->t('Hub bundle'); |
|
| 32 | - } |
|
| 30 | + public function getName() { |
|
| 31 | + return $this->l10n->t('Hub bundle'); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | - public function getAppIdentifiers() { |
|
| 35 | - $hubApps = [ |
|
| 36 | - 'spreed', |
|
| 37 | - 'contacts', |
|
| 38 | - 'calendar', |
|
| 39 | - 'mail', |
|
| 40 | - ]; |
|
| 34 | + public function getAppIdentifiers() { |
|
| 35 | + $hubApps = [ |
|
| 36 | + 'spreed', |
|
| 37 | + 'contacts', |
|
| 38 | + 'calendar', |
|
| 39 | + 'mail', |
|
| 40 | + ]; |
|
| 41 | 41 | |
| 42 | - $architecture = function_exists('php_uname') ? php_uname('m') : null; |
|
| 43 | - if (isset($architecture) && PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) { |
|
| 44 | - $hubApps[] = 'richdocuments'; |
|
| 45 | - $hubApps[] = 'richdocumentscode' . ($architecture === 'aarch64' ? '_arm64' : ''); |
|
| 46 | - } |
|
| 42 | + $architecture = function_exists('php_uname') ? php_uname('m') : null; |
|
| 43 | + if (isset($architecture) && PHP_OS_FAMILY === 'Linux' && in_array($architecture, ['x86_64', 'aarch64'])) { |
|
| 44 | + $hubApps[] = 'richdocuments'; |
|
| 45 | + $hubApps[] = 'richdocumentscode' . ($architecture === 'aarch64' ? '_arm64' : ''); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - return $hubApps; |
|
| 49 | - } |
|
| 48 | + return $hubApps; |
|
| 49 | + } |
|
| 50 | 50 | } |
@@ -31,9 +31,9 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Connect to your account')) ?></h2> |
| 32 | 32 | <p class="info"> |
| 33 | 33 | <?php print_unescaped($l->t('Please log in before granting %1$s access to your %2$s account.', [ |
| 34 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 35 | - \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 36 | - ])) ?> |
|
| 34 | + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 35 | + \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 36 | + ])) ?> |
|
| 37 | 37 | </p> |
| 38 | 38 | |
| 39 | 39 | <div class="notecard warning"> |
@@ -31,15 +31,15 @@ |
||
| 31 | 31 | <h2><?php p($l->t('Account access')) ?></h2> |
| 32 | 32 | <p class="info"> |
| 33 | 33 | <?php p($l->t('Currently logged in as %1$s (%2$s).', [ |
| 34 | - $_['userDisplayName'], |
|
| 35 | - $_['userId'], |
|
| 36 | - ])) ?> |
|
| 34 | + $_['userDisplayName'], |
|
| 35 | + $_['userId'], |
|
| 36 | + ])) ?> |
|
| 37 | 37 | </p> |
| 38 | 38 | <p class="info"> |
| 39 | 39 | <?php print_unescaped($l->t('You are about to grant %1$s access to your %2$s account.', [ |
| 40 | - '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 41 | - \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 42 | - ])) ?> |
|
| 40 | + '<strong>' . \OCP\Util::sanitizeHTML($_['client']) . '</strong>', |
|
| 41 | + \OCP\Util::sanitizeHTML($_['instanceName']) |
|
| 42 | + ])) ?> |
|
| 43 | 43 | </p> |
| 44 | 44 | |
| 45 | 45 | <br/> |
@@ -31,11 +31,11 @@ |
||
| 31 | 31 | * @since 25.0.0 |
| 32 | 32 | */ |
| 33 | 33 | interface IBinaryFinder { |
| 34 | - /** |
|
| 35 | - * Try to find a program |
|
| 36 | - * |
|
| 37 | - * @return false|string |
|
| 38 | - * @since 25.0.0 |
|
| 39 | - */ |
|
| 40 | - public function findBinaryPath(string $program); |
|
| 34 | + /** |
|
| 35 | + * Try to find a program |
|
| 36 | + * |
|
| 37 | + * @return false|string |
|
| 38 | + * @since 25.0.0 |
|
| 39 | + */ |
|
| 40 | + public function findBinaryPath(string $program); |
|
| 41 | 41 | } |
@@ -25,17 +25,17 @@ |
||
| 25 | 25 | use OCP\BackgroundJob\TimedJob; |
| 26 | 26 | |
| 27 | 27 | class TokenCleanupJob extends TimedJob { |
| 28 | - private IProvider $provider; |
|
| 28 | + private IProvider $provider; |
|
| 29 | 29 | |
| 30 | - public function __construct(ITimeFactory $time, IProvider $provider) { |
|
| 31 | - parent::__construct($time); |
|
| 32 | - $this->provider = $provider; |
|
| 33 | - // Run once a day at off-peak time |
|
| 34 | - $this->setInterval(24 * 60 * 60); |
|
| 35 | - $this->setTimeSensitivity(self::TIME_INSENSITIVE); |
|
| 36 | - } |
|
| 30 | + public function __construct(ITimeFactory $time, IProvider $provider) { |
|
| 31 | + parent::__construct($time); |
|
| 32 | + $this->provider = $provider; |
|
| 33 | + // Run once a day at off-peak time |
|
| 34 | + $this->setInterval(24 * 60 * 60); |
|
| 35 | + $this->setTimeSensitivity(self::TIME_INSENSITIVE); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - protected function run($argument) { |
|
| 39 | - $this->provider->invalidateOldTokens(); |
|
| 40 | - } |
|
| 38 | + protected function run($argument) { |
|
| 39 | + $this->provider->invalidateOldTokens(); |
|
| 40 | + } |
|
| 41 | 41 | } |
@@ -31,17 +31,17 @@ |
||
| 31 | 31 | use OCP\Migration\IRepairStep; |
| 32 | 32 | |
| 33 | 33 | class AddTokenCleanupJob implements IRepairStep { |
| 34 | - private IJobList $jobList; |
|
| 34 | + private IJobList $jobList; |
|
| 35 | 35 | |
| 36 | - public function __construct(IJobList $jobList) { |
|
| 37 | - $this->jobList = $jobList; |
|
| 38 | - } |
|
| 36 | + public function __construct(IJobList $jobList) { |
|
| 37 | + $this->jobList = $jobList; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - public function getName(): string { |
|
| 41 | - return 'Add token cleanup job'; |
|
| 42 | - } |
|
| 40 | + public function getName(): string { |
|
| 41 | + return 'Add token cleanup job'; |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - public function run(IOutput $output) { |
|
| 45 | - $this->jobList->add(TokenCleanupJob::class); |
|
| 46 | - } |
|
| 44 | + public function run(IOutput $output) { |
|
| 45 | + $this->jobList->add(TokenCleanupJob::class); |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -28,36 +28,36 @@ |
||
| 28 | 28 | * @since 25.0.0 |
| 29 | 29 | */ |
| 30 | 30 | interface IReferenceProvider { |
| 31 | - /** |
|
| 32 | - * Validate that a given reference identifier matches the current provider |
|
| 33 | - * |
|
| 34 | - * @since 25.0.0 |
|
| 35 | - */ |
|
| 36 | - public function matchReference(string $referenceText): bool; |
|
| 31 | + /** |
|
| 32 | + * Validate that a given reference identifier matches the current provider |
|
| 33 | + * |
|
| 34 | + * @since 25.0.0 |
|
| 35 | + */ |
|
| 36 | + public function matchReference(string $referenceText): bool; |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * Return a reference with its metadata for a given reference identifier |
|
| 40 | - * |
|
| 41 | - * @since 25.0.0 |
|
| 42 | - */ |
|
| 43 | - public function resolveReference(string $referenceText): ?IReference; |
|
| 38 | + /** |
|
| 39 | + * Return a reference with its metadata for a given reference identifier |
|
| 40 | + * |
|
| 41 | + * @since 25.0.0 |
|
| 42 | + */ |
|
| 43 | + public function resolveReference(string $referenceText): ?IReference; |
|
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Return true if the reference metadata can be globally cached |
|
| 47 | - * |
|
| 48 | - * @since 25.0.0 |
|
| 49 | - */ |
|
| 50 | - public function getCachePrefix(string $referenceId): string; |
|
| 45 | + /** |
|
| 46 | + * Return true if the reference metadata can be globally cached |
|
| 47 | + * |
|
| 48 | + * @since 25.0.0 |
|
| 49 | + */ |
|
| 50 | + public function getCachePrefix(string $referenceId): string; |
|
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * Return a custom cache key to be used for caching the metadata |
|
| 54 | - * This could be for example the current user id if the reference |
|
| 55 | - * access permissions are different for each user |
|
| 56 | - * |
|
| 57 | - * Should return null, if the cache is only related to the |
|
| 58 | - * reference id and has no further dependency |
|
| 59 | - * |
|
| 60 | - * @since 25.0.0 |
|
| 61 | - */ |
|
| 62 | - public function getCacheKey(string $referenceId): ?string; |
|
| 52 | + /** |
|
| 53 | + * Return a custom cache key to be used for caching the metadata |
|
| 54 | + * This could be for example the current user id if the reference |
|
| 55 | + * access permissions are different for each user |
|
| 56 | + * |
|
| 57 | + * Should return null, if the cache is only related to the |
|
| 58 | + * reference id and has no further dependency |
|
| 59 | + * |
|
| 60 | + * @since 25.0.0 |
|
| 61 | + */ |
|
| 62 | + public function getCacheKey(string $referenceId): ?string; |
|
| 63 | 63 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | 25 | if ($_['passwordChangeSupported']) { |
| 26 | - \OCP\Util::addScript('settings', 'vue-settings-personal-password'); |
|
| 26 | + \OCP\Util::addScript('settings', 'vue-settings-personal-password'); |
|
| 27 | 27 | } |
| 28 | 28 | ?> |
| 29 | 29 | <div id="security-password"></div> |
@@ -28,58 +28,58 @@ |
||
| 28 | 28 | use Icewind\Streams\Wrapper; |
| 29 | 29 | |
| 30 | 30 | class HashWrapper extends Wrapper { |
| 31 | - protected $callback; |
|
| 32 | - protected $hash; |
|
| 31 | + protected $callback; |
|
| 32 | + protected $hash; |
|
| 33 | 33 | |
| 34 | - public static function wrap($source, string $algo, callable $callback) { |
|
| 35 | - $hash = hash_init($algo); |
|
| 36 | - $context = stream_context_create([ |
|
| 37 | - 'hash' => [ |
|
| 38 | - 'source' => $source, |
|
| 39 | - 'callback' => $callback, |
|
| 40 | - 'hash' => $hash, |
|
| 41 | - ], |
|
| 42 | - ]); |
|
| 43 | - return Wrapper::wrapSource($source, $context, 'hash', self::class); |
|
| 44 | - } |
|
| 34 | + public static function wrap($source, string $algo, callable $callback) { |
|
| 35 | + $hash = hash_init($algo); |
|
| 36 | + $context = stream_context_create([ |
|
| 37 | + 'hash' => [ |
|
| 38 | + 'source' => $source, |
|
| 39 | + 'callback' => $callback, |
|
| 40 | + 'hash' => $hash, |
|
| 41 | + ], |
|
| 42 | + ]); |
|
| 43 | + return Wrapper::wrapSource($source, $context, 'hash', self::class); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - protected function open() { |
|
| 47 | - $context = $this->loadContext('hash'); |
|
| 46 | + protected function open() { |
|
| 47 | + $context = $this->loadContext('hash'); |
|
| 48 | 48 | |
| 49 | - $this->callback = $context['callback']; |
|
| 50 | - $this->hash = $context['hash']; |
|
| 51 | - return true; |
|
| 52 | - } |
|
| 49 | + $this->callback = $context['callback']; |
|
| 50 | + $this->hash = $context['hash']; |
|
| 51 | + return true; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - public function dir_opendir($path, $options) { |
|
| 55 | - return $this->open(); |
|
| 56 | - } |
|
| 54 | + public function dir_opendir($path, $options) { |
|
| 55 | + return $this->open(); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - public function stream_open($path, $mode, $options, &$opened_path) { |
|
| 59 | - return $this->open(); |
|
| 60 | - } |
|
| 58 | + public function stream_open($path, $mode, $options, &$opened_path) { |
|
| 59 | + return $this->open(); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - public function stream_read($count) { |
|
| 63 | - $result = parent::stream_read($count); |
|
| 64 | - hash_update($this->hash, $result); |
|
| 65 | - return $result; |
|
| 66 | - } |
|
| 62 | + public function stream_read($count) { |
|
| 63 | + $result = parent::stream_read($count); |
|
| 64 | + hash_update($this->hash, $result); |
|
| 65 | + return $result; |
|
| 66 | + } |
|
| 67 | 67 | |
| 68 | - public function stream_close() { |
|
| 69 | - if (is_callable($this->callback)) { |
|
| 70 | - // if the stream is closed as a result of the end-of-request GC, the hash context might be cleaned up before this stream |
|
| 71 | - if ($this->hash instanceof \HashContext) { |
|
| 72 | - try { |
|
| 73 | - $hash = @hash_final($this->hash); |
|
| 74 | - if ($hash) { |
|
| 75 | - call_user_func($this->callback, $hash); |
|
| 76 | - } |
|
| 77 | - } catch (\Throwable $e) { |
|
| 78 | - } |
|
| 79 | - } |
|
| 80 | - // prevent further calls by potential PHP 7 GC ghosts |
|
| 81 | - $this->callback = null; |
|
| 82 | - } |
|
| 83 | - return parent::stream_close(); |
|
| 84 | - } |
|
| 68 | + public function stream_close() { |
|
| 69 | + if (is_callable($this->callback)) { |
|
| 70 | + // if the stream is closed as a result of the end-of-request GC, the hash context might be cleaned up before this stream |
|
| 71 | + if ($this->hash instanceof \HashContext) { |
|
| 72 | + try { |
|
| 73 | + $hash = @hash_final($this->hash); |
|
| 74 | + if ($hash) { |
|
| 75 | + call_user_func($this->callback, $hash); |
|
| 76 | + } |
|
| 77 | + } catch (\Throwable $e) { |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | + // prevent further calls by potential PHP 7 GC ghosts |
|
| 81 | + $this->callback = null; |
|
| 82 | + } |
|
| 83 | + return parent::stream_close(); |
|
| 84 | + } |
|
| 85 | 85 | } |