Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542
This commit is contained in:
parent
3b2511d96d
commit
81ccda77eb
2155 changed files with 54307 additions and 46870 deletions
|
@ -30,6 +30,22 @@ class SearchPageTextTest extends SearchTestBase {
|
|||
$this->searchingUser = $this->drupalCreateUser(array('search content', 'access user profiles', 'use advanced search'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for XSS in search module local task.
|
||||
*
|
||||
* This is a regression test for https://www.drupal.org/node/2338081
|
||||
*/
|
||||
function testSearchLabelXSS() {
|
||||
$this->drupalLogin($this->drupalCreateUser(array('administer search')));
|
||||
|
||||
$keys['label'] = '<script>alert("Dont Panic");</script>';
|
||||
$this->drupalPostForm('admin/config/search/pages/manage/node_search', $keys, t('Save search page'));
|
||||
|
||||
$this->drupalLogin($this->searchingUser);
|
||||
$this->drupalGet('search/node');
|
||||
$this->assertEscaped($keys['label']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the failed search text, and various other text on the search page.
|
||||
*/
|
||||
|
@ -119,10 +135,10 @@ class SearchPageTextTest extends SearchTestBase {
|
|||
// message, and that if after that you search for a longer keyword, you
|
||||
// do not still see the message.
|
||||
$this->drupalPostForm('search/node', array('keys' => $this->randomMachineName(1)), t('Search'));
|
||||
$this->assertText('You must include at least one positive keyword', 'Keyword message is displayed when searching for short word');
|
||||
$this->assertText('You must include at least one keyword', 'Keyword message is displayed when searching for short word');
|
||||
$this->assertNoText(t('Please enter some keywords'), 'With short word entered, no keywords message is not displayed');
|
||||
$this->drupalPostForm(NULL, array('keys' => $this->randomMachineName()), t('Search'));
|
||||
$this->assertNoText('You must include at least one positive keyword', 'Keyword message is not displayed when searching for long word after short word search');
|
||||
$this->assertNoText('You must include at least one keyword', 'Keyword message is not displayed when searching for long word after short word search');
|
||||
|
||||
// Test that if you search for a URL with .. in it, you still end up at
|
||||
// the search page. See issue https://www.drupal.org/node/890058.
|
||||
|
@ -135,6 +151,5 @@ class SearchPageTextTest extends SearchTestBase {
|
|||
$this->drupalPostForm('search/node', array('keys' => '.something'), t('Search'));
|
||||
$this->assertResponse(200, 'Searching for .something does not lead to a 403 error');
|
||||
$this->assertText('no results', 'Searching for .something gives you a no search results page');
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue