Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430474
PasswordDef.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
956 B
Referenced Files
None
Subscribers
None
PasswordDef.php
View Options
<?php
namespace
Wikimedia\ParamValidator\TypeDef
;
use
Wikimedia\ParamValidator\ParamValidator
;
/**
* Type definition for "password" types
*
* This is a string type that forces PARAM_SENSITIVE = true.
*
* @see StringDef
* @since 1.34
* @unstable
*/
class
PasswordDef
extends
StringDef
{
/** @inheritDoc */
public
function
normalizeSettings
(
array
$settings
)
{
$settings
[
ParamValidator
::
PARAM_SENSITIVE
]
=
true
;
return
parent
::
normalizeSettings
(
$settings
);
}
/** @inheritDoc */
public
function
checkSettings
(
string
$name
,
$settings
,
array
$options
,
array
$ret
):
array
{
$ret
=
parent
::
checkSettings
(
$name
,
$settings
,
$options
,
$ret
);
if
(
(
$settings
[
ParamValidator
::
PARAM_SENSITIVE
]
??
true
)
!==
true
&&
!
isset
(
$ret
[
'issues'
][
ParamValidator
::
PARAM_SENSITIVE
]
)
)
{
$ret
[
'issues'
][
ParamValidator
::
PARAM_SENSITIVE
]
=
'Cannot set PARAM_SENSITIVE to false for password-type parameters'
;
}
return
$ret
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 18:47 (5 h, 11 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/e3/2ef7b818ef3363ecdd2776babdbb
Default Alt Text
PasswordDef.php (956 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment