Skip to content
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
6 changes: 3 additions & 3 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Changes in 2.1.2
- [FEATURE #13] add TIMEOUTS constant to config/Diagnostics.php to eliminate
very long delays in testing sites - this requires updating
your instance following the Diagnostics-template.php
- [FEATURE #14] Improvemens to the linux python installed, in particular add support
- [FEATURE #14] Improvements to the linux python installed, in particular add support
for Tkinker and yad provided by https://github.com/sdasda7777
- [FEATURE #15] Removing the Registered Trademark character form the eduroam profile
name in Windows
Expand All @@ -101,7 +101,7 @@ Changes in 2.1.2
the deprecated FILTER_SANITIZE_STRING usage
- [BUGFIX #2] replaced slow SQL queries in Managed IdP area with much faster ones
- [BUGFIX #3] fixed blocking of Ajax requests caused by php sessions
- [BUGFIX #4] added several mising indexes in tables
- [BUGFIX #4] added several missing indexes in tables
- [BUGFIX #5] reduced number of database queries in overrvier_federation.php

Changes in 2.1
Expand Down Expand Up @@ -309,7 +309,7 @@ Upgrade path notice: it is not possible to upgrade directly from 1.0 to 1.2
overview page
- [FEATURE #5] federation customisation: name, logo, custom invitation texts and
more
- [FEATURE #6] deprecated NSISArray has been replaced with nsArry
- [FEATURE #6] deprecated NSISArray has been replaced with nsArray
- [FEATURE #7] Support for UTF-8 installer has been added (this requires nsis v3)
- [FEATURE #8] also check for SHA-1 signatures and warn if found
- [FEATURE #9] implement skin selection system. For details read
Expand Down
2 changes: 1 addition & 1 deletion config/ConfAssistant-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class ConfAssistant
* "testing" controls which instance of eduPKI we are using and also
* the requested expiry time of the certificates (1y for testing, 5y for production)
* "max_expiry" set to true means that we will be requesting certificates
* with maximum avaliable validity, controlled by eduPKI defaults (at the moment
* with maximum available validity, controlled by eduPKI defaults (at the moment
* the expiry date of the CA certificate)
*/
const eduPKI = [
Expand Down
2 changes: 1 addition & 1 deletion config/Diagnostics-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class Diagnostics
'secret' => '1q2w3e4r5t0O9I8U7Y6TaZ',
];
const TIMEOUTS = [
'ajax_radius_tests' => 15000, // miliseconds
'ajax_radius_tests' => 15000, // milliseconds
'crl_download' => 10, // seconds
];
}
6 changes: 3 additions & 3 deletions config/Master-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Master
'certfilename' => NULL,
'keyfilename' => NULL,
'keypass' => NULL,
'notify_nro' => false, // normally should be set to TRUE abd causes
'notify_nro' => false, // normally should be set to TRUE and cause
// notifications being sent to NRO admins when
// important changes are made
];
Expand Down Expand Up @@ -280,8 +280,8 @@ class Master
* We are now prepared to use a local cache database. For the eduroam case a daily
* update is sufficient and is done by the utils/update_monitor_copy.php. In this case
* the EXTERNAL is actually a local DB, and EXTERNAL_SOURCE is used as the actual
* source for caching. You may use the EXTERNAL as a real extermal database and
* do not worry about setting aything in EXTERNAL_SOURCE
* source for caching. You may use the EXTERNAL as a real external database and
* do not worry about setting anything in EXTERNAL_SOURCE
*
* The code for the consortium "eduroam" is already written and may serve as template. See the functions in question. */
// Marking this as readonly currently has no effect, as we only ever do SELECTs on that database
Expand Down
2 changes: 1 addition & 1 deletion core/AbstractProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ public function setRealm(string $realm)
* register new supported EAP method for this profile
*
* @param \core\common\EAP $type The EAP Type, as defined in class EAP
* @param int $preference preference of this EAP Type. If a preference value is re-used, the order of EAP types of the same preference level is undefined.
* @param int $preference preference of this EAP Type. If a preference value is reused, the order of EAP types of the same preference level is undefined.
* @return void
*/
public function addSupportedEapMethod(\core\common\EAP $type, $preference)
Expand Down
2 changes: 1 addition & 1 deletion core/DeploymentManaged.php
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ public function setRADIUSconfig($onlyone = 0, $notify = 0, $torevoke = "")
$response = array();
foreach ($toPost as $key => $value) {
$this->loggerInstance->debug(1, 'toPost ' . $toPost[$key] . "\n");
// temporarly one server $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
// temporarily one server $response['res[' . $key . ']'] = $this->sendToRADIUS($key, $toPost[$key]);
/*if ($key == 2) {
$response['res[2]'] = 'OK';
} else { */
Expand Down
4 changes: 2 additions & 2 deletions core/DeviceConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ final protected function copyFile($source_name, $output_name = NULL)
final protected function saveCertificateFiles($format)
{
switch ($format) {
case "der": // fall-thorugh, same treatment
case "der": // fall-through, same treatment
case "pem":
$iterator = 0;
$caFiles = [];
Expand Down Expand Up @@ -682,7 +682,7 @@ private function saveInfoFile($blob)
{
$finfo = new \finfo(FILEINFO_MIME_TYPE);
$mime = $finfo->buffer($blob);
$ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'usupported';
$ext = isset($this->mime_extensions[$mime]) ? $this->mime_extensions[$mime] : 'unsupported';
$this->loggerInstance->debug(5, "saveInfoFile: $mime : $ext\n");
$fileHandle = fopen('local-info.'.$ext, "w");
if ($fileHandle === FALSE) {
Expand Down
2 changes: 1 addition & 1 deletion core/DeviceXMLmain.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function setChild($name, $value, $namespace = NULL, $type = NULL)
*
* @param $node \SimpleXMLElement DOM object to which the node is to be attached
* @param $name the tag name of the child node to be attached
* @param $object the XXX object which is to be transfored to the DOM object
* @param $object the XXX object which is to be transformed to the DOM object
* and attached as a child to the $node
* @param $namespace of the child
* @param $root Boolean - if true treat the node as the tree root, i.e do not
Expand Down
4 changes: 2 additions & 2 deletions core/EntityWithDBProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ private function getRelevantIdentifier()
* are not considered.
*
* @param string $optionName optionally, the name of the attribute that is to be retrieved
* @param string$omittedOptionName optionally drop attibutes with that name
* @param string$omittedOptionName optionally drop attributes with that name
* @return array of arrays of attributes which were set for this IdP
*/
public function getAttributes(string $optionName = NULL, string $omittedOptionName = NULL)
{
if ($optionName !== NULL) {
if ($optionName === $omittedOptionName) {
throw new Exception("The attibute to be shown has the same name as that to be omitted");
throw new Exception("The attribute to be shown has the same name as that to be omitted");
}
$returnarray = [];
foreach ($this->attributes as $theAttr) {
Expand Down
6 changes: 3 additions & 3 deletions core/ExternalEduroamDBData.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ public function countAllServiceProviders() {
* separate institution names as written in the eduroam DB into array
*
* @param string $collapsed - '#' separated list of names - each name has
* two-letter language prefic followed by ':'
* @return array $nameList - tle list contains both separate per-lang entires
* two-letter language prefix followed by ':'
* @return array $nameList - tle list contains both separate per-lang entries
* and a joint one, just names no lang info - this used for comparison with CAT institution names
*/
public static function dissectCollapsedInstitutionNames($collapsed) {
Expand Down Expand Up @@ -307,7 +307,7 @@ public function listExternalEntitiesByRealm($realm, $fields = []) {

/**
* retrieves the list of identifiers (external and local) of all institutions
* which have the admin email listed in the externam DB, thos that are synced to an
* which have the admin email listed in the external DB, those that are synced to an
* existing CAT institution will also have the local identifier (else NULL)
*
* @param string $userEmail
Expand Down
2 changes: 1 addition & 1 deletion core/ExternalNothing.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function listExternalTlsServersInstitution($tld, $include_not_ready=FALSE

/**
* retrieves the list of identifiers (external and local) of all institutions
* which have the admin email listed in the externam DB, thos that are synced to an
* which have the admin email listed in the external DB, those that are synced to an
* existing CAT institution will also have the local identifier (else NULL)
*
* @param string $userEmail
Expand Down
4 changes: 2 additions & 2 deletions core/Federation.php
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ public static function isFlatAdminStructure($fedname) {

/**
* Loads existing admins in all institutions of a given federation and check if some have been
* inactive for a time longet that allowed threshold. Marks institutions as 0 - all good
* inactive for a time longer that allowed threshold. Marks institutions as 0 - all good
* or 1 - inactive admin(s) found
* Sets the results in $this->adminLogins array
*/
Expand All @@ -920,7 +920,7 @@ public function loadAdminsLogins() {
} else {
$inactivityTimestamp = time() - $inactivityOverride[0]['value'] * 24 * 3600;
}
// $active shows the time difference between the moment when a login thime would be considered as inactive
// $active shows the time difference between the moment when a login would be considered as inactive
// and the start of the recording system. If this is negative then we we cannot tell that someone who
// was not recorded was not actually active within the allowed period
$active = $inactivityTimestamp - strtotime(\config\ConfAssistant::ADMIN_LOGINS['startday']);
Expand Down
4 changes: 2 additions & 2 deletions core/IdPlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ public static function listAllIdentityProviders($activeOnly = 0, $country = "")
}

/**
* outputs a full list of IdPs containing the fllowing data:
* outputs a full list of IdPs containing the following data:
* institution_is, institution name in all available languages,
* list of production profiles.
* For eache profile the profile identifier, profile name in all languages
* For each profile the profile identifier, profile name in all languages
* and redirect values (empty rediret value means that no redirect has been
* set).
*
Expand Down
4 changes: 2 additions & 2 deletions core/ProfileSilverbullet.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function updateCache($device, $path, $mime, $integerEapType, $openRoaming
* register new supported EAP method for this profile
*
* @param \core\common\EAP $type The EAP Type, as defined in class EAP
* @param int $preference preference of this EAP Type. If a preference value is re-used, the order of EAP types of the same preference level is undefined.
* @param int $preference preference of this EAP Type. If a preference value is reused, the order of EAP types of the same preference level is undefined.
* @return void
* @throws Exception
*/
Expand Down Expand Up @@ -252,7 +252,7 @@ public function getUserExpiryDate($userId) {
*
* @param int $userId the numerical user ID of the user in question
* @param boolean $testActivity set true if we are only interested in checking
* user existance in auth database
* user existence in auth database
* @return array
*/
public function getUserAuthRecords($userId, $testActivity = false) {
Expand Down
4 changes: 2 additions & 2 deletions core/UserAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,10 +492,10 @@ public function orderIdentityProviders($country, $currentLocation)
}

/**
* outputs a full list of IdPs containing the fllowing data:
* outputs a full list of IdPs containing the following data:
* institution_is, institution name in all available languages,
* list of production profiles.
* For eache profile the profile identifier, profile name in all languages
* For each profile the profile identifier, profile name in all languages
* and redirect values (empty rediret value means that no redirect has been
* set).
*
Expand Down
24 changes: 12 additions & 12 deletions core/UserManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class UserManagement extends \core\common\Entity
private $databaseHandle;
public $currentInstitutions;
public $newUser = false;
public $hasPotenialNewInst = false;
public $hasPotentialNewInst = false;

/**
* Class constructor. Nothing special to be done when constructing.
Expand Down Expand Up @@ -391,7 +391,7 @@ public function listRecentlyExpiredInvitations()
public function listInstitutionsByAdmin()
{
$edugain = $_SESSION['eduGAIN'];
// get the list of local identifers of institutions managed by this user
// get the list of local identifiers of institutions managed by this user
// it will be returned as $this->currentInstitutions
$this->getCurrentInstitutionsByAdmin();
if (count($this->currentInstitutions) == 0) {
Expand All @@ -403,7 +403,7 @@ public function listInstitutionsByAdmin()
return $this->currentInstitutions;
}
// now add additional institutions based on the external DB
// proceed only if user has been authenticated fron an eduGAIN IdP
// proceed only if user has been authenticated from an eduGAIN IdP
if ($edugain == false) {
return $this->currentInstitutions;
}
Expand All @@ -412,7 +412,7 @@ public function listInstitutionsByAdmin()
// get the list of identifiers in the external DB with this user listed as the admin and linked to CAT institutions
$extInstList = $externalDB->listExternalEntitiesByUserEmail($email);
$extInstListTmp = $extInstList;
// we begin by removing entites in $extInstList which are already managed by this user and synced -
// we begin by removing entities in $extInstList which are already managed by this user and synced -
// these require no further checking
foreach ($extInstListTmp as $country => $extInstCountryList) {
$len = count($extInstCountryList);
Expand Down Expand Up @@ -508,11 +508,11 @@ private function doExternalDBAutoregisterNew($extInstCountryList, $fed) {
}
foreach ($extInstCountryList as $extInst) {
common\Logging::debug_s(4, "Testing ".$extInst['external_db_id']." for potential new inst\n");
if ($extInst['inst_id'] != null) { // there alreay exeists a CAT institution synced to this one
if ($extInst['inst_id'] != null) { // there already exeists a CAT institution synced to this one
continue;
}
$country = strtoupper($fed->tld);
// now run checks against creating dupplicates in CAT DB
// now run checks against creating duplicates in CAT DB
$disectedNames = ExternalEduroamDBData::dissectCollapsedInstitutionNames($extInst['name']);
$names = $disectedNames['joint'];
$realms = ExternalEduroamDBData::dissectCollapsedInstitutionRealms($extInst['realm']);
Expand Down Expand Up @@ -566,7 +566,7 @@ private function listCatInstitutionsByPairwiseId() {
return [];
}

// get realm from pariwise-id
// get realm from pairwise-id
if (preg_match('/^pairwise-id:[^@]+@([^!]+)!/', $userId, $matches) == 0) {
return [];
}
Expand Down Expand Up @@ -644,8 +644,8 @@ public function checkForCatMatch($extId, $ROid) {
/**
* get the list of current institutions of the given admin
*
* This method does not rerurn anything but sets $this->currentInstitutions
* it only fillsh the 'existing' block, leaving the other two for other methods
* This method does not return anything but sets $this->currentInstitutions
* it only fills the 'existing' block, leaving the other two for other methods
* to deal with
*/
private function getCurrentInstitutionsByAdmin() {
Expand All @@ -657,7 +657,7 @@ private function getCurrentInstitutionsByAdmin() {
'entitlement' => []
];
$userId = $_SESSION['user'];
// get the list of local identifers of institutions managed by this user
// get the list of local identifiers of institutions managed by this user
$institutions = $this->databaseHandle->exec("SELECT ownership.institution_id as inst_id, ownership.blesslevel AS blesslevel FROM ownership WHERE user_id = ? ORDER BY institution_id", "s", $userId);
// SELECT -> resource, not boolean
$catInstList = $institutions->fetch_all();
Expand All @@ -676,9 +676,9 @@ private function getCurrentInstitutionsByAdmin() {

/**
* given arrays of realms and names check if there already are institutions in CAT that
* could be a match - this is for ellimination and against creating duplicates
* could be a match - this is for elimination and against creating duplicates
* still this is not perfect, no realms given and institutions with a slightly different
* name will return no-match and thus open possibility for dupplicates
* name will return no-match and thus open possibility for duplicates
*
* @param array $namesToTest
* @param array $realmsToTest
Expand Down
4 changes: 2 additions & 2 deletions core/UserNetAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ public function jsonListProfiles($idpIdentifier, $sort = 0)
}

/**
* outputs a full list of IdPs containing the fllowing data:
* outputs a full list of IdPs containing the following data:
* institution_is, institution name in all available languages,
* list of production profiles.
* For eache profile the profile identifier, profile name in all languages
* For each profile the profile identifier, profile name in all languages
* and redirect values (empty rediret value means that no redirect has been
* set).
* @return array of identity providers with attributes
Expand Down
Loading
Loading