Skip to content

Commit 62398f7

Browse files
author
Mark Berube
committed
MAGETWO-96534: Changing random string generation
1 parent 3d0c42d commit 62398f7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/code/Magento/Captcha/Model/DefaultModel.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,16 @@ protected function _generateWord()
378378
return $this->randomMath->getRandomString($wordLen, $symbols);
379379
}
380380

381+
/**
382+
* Get symbols array to use for word generation
383+
*
384+
* @return array
385+
*/
386+
protected function _getSymbols()
387+
{
388+
return str_split((string)$this->_captchaData->getConfig('symbols'));
389+
}
390+
381391
/**
382392
* Returns length for generating captcha word. This value may be dynamic.
383393
*

app/code/Magento/Captcha/Test/Unit/Model/DefaultTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ public function testGenerateWord($string)
405405
/**
406406
* @return array
407407
*/
408-
public function GenerateWordProvider()
408+
public function generateWordProvider()
409409
{
410410
return [
411411
['ABC123'],

0 commit comments

Comments
 (0)