Skip to content

Commit c176167

Browse files
Merge pull request #1119 from Kitware/releases/3.0
Merge release branch back into master
2 parents 70eb0da + 2d125e5 commit c176167

39 files changed

Lines changed: 1553 additions & 523 deletions

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ MIX_APP_URL="${APP_URL}"
2121
# cdash.php
2222
#SLOW_PAGE_TIME=10
2323

24+
# The label on the "user" field for the Login form, defaults to Email.
25+
# Consider changing this for clarity if you're authenticating against
26+
# something other than an email address in LDAP.
27+
#LOGIN_FIELD=Email
28+
2429
# Maximum number of builds allowed per project.
2530
# When set to 0 projects are not limited by number of builds.
2631
#BUILDS_PER_PROJECT=0
@@ -76,10 +81,14 @@ MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
7681
# The type of LDAP server you are connecting to.
7782
# Valid values are activedirectory, openldap, and freeipa.
7883
#LDAP_PROVIDER=
84+
# Whether or not to log LDAP activities. Useful for debugging.
85+
#LDAP_LOGGING=
7986

8087
# ldap_auth.php
8188
# The LDAP users attribute containing their email address ('mail' by default).
8289
#LDAP_EMAIL_ATTRIBUTE=
90+
# The LDAP users attribute used to locate your users. ('mail' by default).
91+
#LDAP_LOCATE_USERS_BY=
8392
# The LDAP users attribute used for authentication ('distinguishedname' by default).
8493
#LDAP_BIND_USERS_BY=
8594
# The LDAP attribute name that contains your users object GUID.

app/Models/Ldap/User.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace App\Models\Ldap;
4+
5+
use Adldap\Models\User as BaseModel;
6+
7+
class User extends BaseModel
8+
{
9+
/**
10+
* Returns the model's GUID as is (not converted to binary).
11+
*
12+
* @return string|null
13+
*/
14+
public function getConvertedGuid()
15+
{
16+
return $this->getObjectGuid();
17+
}
18+
}

app/Schemas/OpenLDAP.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ public function objectGuid()
1212
{
1313
return env('LDAP_GUID', parent::objectGuid());
1414
}
15+
16+
public function userModel()
17+
{
18+
return \App\Models\Ldap\User::class;
19+
}
1520
}

app/Services/TestCreator.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ public function computeCrc32()
116116
$crc32_input .= pdo_real_escape_string($this->testOutput);
117117
$crc32_input .= pdo_real_escape_string($this->testDetails);
118118
foreach ($this->measurements as $measurement) {
119-
$crc32_input .= $measurement->Type . $measurement->Name . $measurement->Value;
119+
$crc32_input .= "_" . pdo_real_escape_string($measurement->type);
120+
$crc32_input .= "_" . pdo_real_escape_string($measurement->name);
121+
$crc32_input .= "_" . pdo_real_escape_string($measurement->value);
120122
}
121123

122124
foreach ($this->images as $image) {

app/cdash/app/Model/DynamicAnalysis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function Insert()
162162
$uncompressed_log = '';
163163
$inflate_context = inflate_init(ZLIB_ENCODING_DEFLATE);
164164
foreach (str_split($this->Log, 1024) as $chunk) {
165-
$uncompressed_log = inflate_add($inflate_context, $chunk, ZLIB_NO_FLUSH);
165+
$uncompressed_log .= inflate_add($inflate_context, $chunk, ZLIB_NO_FLUSH);
166166
if (strlen($uncompressed_log) >= $max_log_length) {
167167
break;
168168
}

app/cdash/include/ctestparser.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ function generateBackupFileName($projectname, $buildname, $sitename, $stamp,
7676
$filename .= $sitename_escaped . '_' . $buildname_escaped . '_' . $stamp . '_';
7777
}
7878
$filename .= $currenttimestamp . '_' . $file . $ext;
79+
80+
// Make sure we don't generate a filename that's too long, otherwise
81+
// fopen() will fail later.
82+
$maxChars = 250;
83+
$textLength = strlen($filename);
84+
if ($textLength > $maxChars) {
85+
$filename = substr_replace($filename, '', $maxChars/2, $textLength-$maxChars);
86+
}
87+
7988
return $filename;
8089
}
8190

app/cdash/include/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
// Current version
1818
$CDASH_VERSION_MAJOR = '3';
1919
$CDASH_VERSION_MINOR = '0';
20-
$CDASH_VERSION_PATCH = '2';
20+
$CDASH_VERSION_PATCH = '3';
2121
$CDASH_VERSION = $CDASH_VERSION_MAJOR . '.' . $CDASH_VERSION_MINOR . '.' . $CDASH_VERSION_PATCH;

app/cdash/public/api/v1/testDetails.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function utf8_for_xml($string)
145145
// If so we should make that chart appear when they click next or previous.
146146
$extra_url = '';
147147
if (array_key_exists('graph', $_GET)) {
148-
$extra_url = "&graph=" . $_GET['graph'];
148+
$extra_url = "?graph=" . $_GET['graph'];
149149
}
150150

151151
// Previous build

app/cdash/public/views/viewTest.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ <h3 ng-switch-default id="test-totals-indicator">
241241

242242
<td ng-if="::cdash.project.showtesttime == 1"
243243
align="center" ng-class="::test.timestatusclass">
244-
<a ng-href="{{::test.detailsLink}}&graph=time"
244+
<a ng-href="{{::test.detailsLink}}?graph=time"
245245
ng-click="cancelAjax()">{{::test.timestatus}}</a>
246246
</td>
247247

app/cdash/tests/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ add_laravel_test(/Unit/app/Validators/PasswordTest)
5353
add_laravel_test(/Feature/ConsumeSubmissionCommand)
5454
add_laravel_test(/Feature/CDashTest)
5555
add_laravel_test(/Feature/LdapAuthWithRulesTest)
56+
add_laravel_test(/Feature/OpenLdapAuthWithOverrides)
5657
add_laravel_test(/Feature/MigrateConfigCommand)
5758
add_laravel_test(/Feature/UserCommand)
5859
add_unit_test(/PHPUnitTest)
@@ -227,6 +228,9 @@ add_php_test(numericupdate)
227228
add_php_test(attachedfiles)
228229
add_php_test(subprojectorder)
229230
add_php_test(testimages)
231+
add_php_test(dynamicanalysislogs)
232+
add_php_test(namedmeasurements)
233+
add_php_test(longbuildname)
230234

231235
add_subdirectory(ctest)
232236

0 commit comments

Comments
 (0)