Skip to content

Commit

Permalink
Fix for #4425
Browse files Browse the repository at this point in the history
Duplicate the change to teampassclasses libraries
Updated composer libraries
  • Loading branch information
nilsteampassnet committed Oct 30, 2024
1 parent aa94955 commit a25842d
Show file tree
Hide file tree
Showing 75 changed files with 862 additions and 566 deletions.
190 changes: 95 additions & 95 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/config/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

define('TP_VERSION', '3.1.2');
define("UPGRADE_MIN_DATE", "1727110744");
define('TP_VERSION_MINOR', '145');
define('TP_VERSION_MINOR', '146');
define('TP_TOOL_NAME', 'Teampass');
define('TP_ONE_DAY_SECONDS', 86400);
define('TP_ONE_WEEK_SECONDS', 604800);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getADGroups(Connection $connection, array $settings): array
}
try {
// perform query and get data
$groups = $query->get();
$groups = $query->paginate();

$groupsArr = [];
foreach($groups as $key => $group) {
Expand Down Expand Up @@ -103,7 +103,7 @@ function getUserADGroups(string $userDN, Connection $connection, array $SETTINGS

// Get user groups from AD
$user = User::find($userDN);
$groups = $user->groups()->get();
$groups = $user->groups()->paginate();
foreach ($groups as $group) {
array_push(
$groupsArr,
Expand Down
10 changes: 5 additions & 5 deletions includes/tables_integrity.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
},
{
"table_name": "background_tasks",
"structure_hash": "089fe901b3cf7c5a47654279604bca68f3772ae970eac1adfdb75881b072fe20"
"structure_hash": "fd4c4b736e7a42a996ed71f50e41e689ad12e8671af8fc500181fad9bdc55023"
},
{
"table_name": "background_tasks_logs",
"structure_hash": "dea00b212db05a1b3d16349da517630bc202a7381103628d0cbab5bfd9cc6e5a"
"structure_hash": "5b2ed5c4868ef98b73ef00615d92f12f592f8ee531bef5dfe57d33e7fa399498"
},
{
"table_name": "cache",
Expand Down Expand Up @@ -101,11 +101,11 @@
},
{
"table_name": "log_system",
"structure_hash": "4b3ccbfe4abc5e9c60d84833483a9a7e2f29a3c8b29bb6d34b42df441430d0f4"
"structure_hash": "439acf7691d2f021a6362472ec0f44c49de1262348ef7b2aa3292d24da2e354c"
},
{
"table_name": "misc",
"structure_hash": "d3f4410ec4c37c578fb9486f889c7c714e6434d956d5d44c9049fb33d994bf0b"
"structure_hash": "11a5697b1fe86a163b2a018ea12376a4b9aeb900aee35b6ca6e780cd80a6048f"
},
{
"table_name": "nested_tree",
Expand Down Expand Up @@ -193,7 +193,7 @@
},
{
"table_name": "tokens",
"structure_hash": "33d70cb41a8742d39628d926bc175f9eb23343c128998f7116c99ae7b0c542a9"
"structure_hash": "69e5cd80e698c2fcb10d413e0964b275f34977f19f934274b4e81ca26f958b69"
},
{
"table_name": "user_requests",
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function getLoader()
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite3f3ee27f81ca21f7bd7499d7b935c11::getInitializer($loader));

$loader->setApcuPrefix('b76ed211a9f7fcf74293');
$loader->setApcuPrefix('2d77c0a156048b262e6b');
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInite3f3ee27f81ca21f7bd7499d7b935c11::$files;
Expand Down
82 changes: 41 additions & 41 deletions vendor/composer/composer/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Composer\Util\PackageSorter;
use Composer\Json\JsonFile;
use Composer\Package\Locker;
use Symfony\Component\Console\Formatter\OutputFormatter;

/**
* @author Igor Wiedler <igor@wiedler.ch>
Expand Down Expand Up @@ -380,6 +381,9 @@ public static function autoload(\$class)
);
}
}
if (\count($ambiguousClasses) > 0) {
$this->io->writeError('<info>To resolve ambiguity in classes not under your control you can ignore them by path using <href='.OutputFormatter::escape('https://getcomposer.org/doc/04-schema.md#exclude-files-from-classmaps').'>exclude-files-from-classmap</>');
}

// output PSR violations which are not coming from the vendor dir
$classMap->clearPsrViolationsByPath($vendorPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,7 @@ public function doBump(
}

if (!$dryRun && $composer->getLocker()->isLocked() && $changeCount > 0) {
$contents = file_get_contents($composerJson->getPath());
if (false === $contents) {
throw new \RuntimeException('Unable to read '.$composerJson->getPath().' contents to update the lock file hash.');
}
$lock = new JsonFile(Factory::getLockFile($composerJsonPath));
$lockData = $lock->read();
$lockData['content-hash'] = Locker::getContentHash($contents);
$lock->write($lockData);
$composer->getLocker()->updateHash($composerJson);
}

if ($dryRun && $changeCount > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,21 +424,16 @@ protected function installRootPackage(InputInterface $input, IOInterface $io, Co
throw new \InvalidArgumentException($errorMessage .'.');
}

$oldCwd = Platform::getCwd();
// handler Ctrl+C aborts gracefully
@mkdir($directory, 0777, true);
if (false !== ($realDir = realpath($directory))) {
$signalHandler = SignalHandler::create([SignalHandler::SIGINT, SignalHandler::SIGTERM, SignalHandler::SIGHUP], function (string $signal, SignalHandler $handler) use ($realDir, $oldCwd) {
chdir($oldCwd);
$signalHandler = SignalHandler::create([SignalHandler::SIGINT, SignalHandler::SIGTERM, SignalHandler::SIGHUP], function (string $signal, SignalHandler $handler) use ($realDir) {
$this->getIO()->writeError('Received '.$signal.', aborting', true, IOInterface::DEBUG);
$fs = new Filesystem();
$fs->removeDirectory($realDir);
$handler->exitWithLastSignal();
});
}
if (!chdir($directory)) {
throw new \RuntimeException('Failed to chdir into the new project dir at '.$directory);
}

// avoid displaying 9999999-dev as version if default-branch was selected
if ($package instanceof AliasPackage && $package->getPrettyVersion() === VersionParser::DEFAULT_BRANCH_ALIAS) {
Expand Down Expand Up @@ -472,6 +467,7 @@ protected function installRootPackage(InputInterface $input, IOInterface $io, Co
$installedFromVcs = 'source' === $package->getInstallationSource();

$io->writeError('<info>Created project in ' . $directory . '</info>');
chdir($directory);

// ensure that the env var being set does not interfere with create-project
// as it is probably not meant to be used here, so we do not use it if a composer.json can be found
Expand Down
Loading

0 comments on commit a25842d

Please sign in to comment.