PluginProbe
bbPress / 2.6.19
bbPress v2.6.19
2.6.19 2.6.18 2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 All 74 releases
← All changes | includes/admin/converters/Example.php +4 -10 2.6.17 → 2.6.19 View file →
@@ -9,9 +9,9 @@
9 9
10 10 /**
11 11 * Example converter base impoprter template for bbPress
12 12 *
13 - * @since 2.3.0 bbPress (r4689)
13 + * @since 2.4.0 bbPress (r5014)
14 14 *
15 15 * @link Codex Docs https://codex.bbpress.org/import-forums/custom-import
16 16 */
17 17 class Example extends BBP_Converter_Base {
@@ -697,9 +697,9 @@
697 697 */
698 698 public function callback_savepass( $field, $row ) {
699 699 $pass_array = array(
700 700 'hash' => $field,
701 - 'salt' => $row['salt']
701 + 'salt' => isset( $row['salt'] ) ? wp_slash( (string) $row['salt'] ) : ''
702 702 );
703 703
704 704 return $pass_array;
705 705 }
@@ -710,18 +710,12 @@
710 710 */
711 711 public function authenticate_pass( $password, $serialized_pass ) {
712 712
713 713 // Unserialize the password, with safeguards
714 - $pass_array = unserialize(
715 - $serialized_pass,
716 - array(
717 - 'allowed_classes' => false,
718 - 'max_depth' => 1
719 - )
720 - );
714 + $pass_array = $this->unserialize_pass( $serialized_pass );
721 715
722 716 // Bail if missing values
723 - if ( ! is_array( $pass_array ) || ! isset( $pass_array['hash'], $pass_array['salt'] ) ) {
717 + if ( ! is_string( $password ) || ! is_array( $pass_array ) || ! isset( $pass_array['hash'], $pass_array['salt'] ) || ! is_string( $pass_array['hash'] ) || ! is_string( $pass_array['salt'] ) ) {
724 718 return false;
725 719 }
726 720
727 721 // Return comparison