Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Dependabot Alerts #1891

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,26 @@ jobs:
XDMOD_INSTALL_DIR: /xdmod
XDMOD_TEST_MODE: << parameters.install-type >>
steps:
- run:
name: Generate OpenSSL Key
command: openssl genrsa -rand /proc/cpuinfo:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/uptime 2048 > /etc/pki/tls/private/localhost.key
- run:
name: Generate Certificate
command: /usr/bin/openssl req -new -key /etc/pki/tls/private/localhost.key -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req -out /etc/pki/tls/certs/localhost.crt -subj "/C=XX/L=Default City/O=Default Company Ltd"
- checkout
# We need to update our acct before we can enable docker layer caching
#- setup_remote_docker:
# docker_layer_caching: true
# Download and cache dependencies
- run:
name: Update php module
command: dnf module -y reset php && dnf module -y enable php:7.4
- run:
name: Install PHP 7.4 and PHP module pre-reqs & an updated version of PHP Pear
command: dnf install -y php libzip-devel php-pear php-devel
- run:
name: Install MongoDB Pear module
command: yes '' | pecl install mongodb || true
- run:
name: install the composer dependencies
command: composer install
Expand Down
2 changes: 1 addition & 1 deletion classes/Rest/Controllers/BaseControllerProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Rest\Utilities\Authorization;
use Silex\Application;
use Silex\ControllerCollection;
use Silex\ControllerProviderInterface;
use Silex\Api\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
Expand Down
9 changes: 4 additions & 5 deletions classes/Rest/XdmodApplicationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Rest\Controllers\BaseControllerProvider;
use Rest\Utilities\Authentication;
use Silex\Application;
use Silex\Provider\UrlGeneratorServiceProvider;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

Expand Down Expand Up @@ -64,7 +63,7 @@ public static function getInstance()
$app['debug'] = filter_var(\xd_utilities\getConfiguration('general', 'debug_mode'), FILTER_VALIDATE_BOOLEAN);

// REGISTER: a URL Generator.
$app->register(new UrlGeneratorServiceProvider());
$app->register(new \Silex\Provider\RoutingServiceProvider());

// SET: the regex that will be used to filter the API_SYMBOL in a route.
// in this case we're using it as our base url.
Expand All @@ -74,14 +73,14 @@ public static function getInstance()
// representing the latest version.
$app['controllers']->value(self::API_SYMBOL, 'latest');

$app['logger.db'] = $app->share(function () {
$app['logger.db'] = function () {
return \CCR\Log::factory('rest.logger.db', array(
'console' => false,
'file' => false,
'mail' => false,
'dbLogLevel' => \CCR\Log::INFO
));
});
};

$app->before(function (Request $request, Application $app) {
$request->attributes->set('timing.start', microtime(true));
Expand Down Expand Up @@ -226,7 +225,7 @@ public static function getInstance()
}

// SETUP: error handler
$app->error(function (\Exception $e, $code) use ($app) {
$app->error(function (\Exception $e, Request $request, $code) {
if($code == 405 && strtoupper($_SERVER['REQUEST_METHOD']) === 'OPTIONS' && array_key_exists('HTTP_ORIGIN', $_SERVER)){
try {
$corsDomains = \xd_utilities\getConfiguration('cors', 'domains');
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"phpmailer/phpmailer": "~6.9",
"robrichards/xmlseclibs": "~3.0",
"sencha/extjs-gpl": "3.4.*",
"silex/silex": "~1.2",
"silex/silex": "v2.3.0",
"simplesamlphp/simplesamlphp": "^1.16",
"symfony/polyfill-php56": "~1.11",
"symfony/process": "~2.0",
Expand All @@ -30,7 +30,7 @@
"kassner/log-parser": "~1.5",
"geoip2/geoip2": "~2.0",
"ua-parser/uap-php": "^3.9",
"mongodb/mongodb": "^1.14"
"mongodb/mongodb": "^1.19.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
Expand Down
Loading