Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29994

Length of Password for replication and upgrade

Details

    Description

      I set up replication, with this password : (10.7.4)

      ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xCJg=
      

      Everything working fine, after i decided to upgrade to 10.7.7

      apt update
      apt upgrade
      

      then the password become :

      ePE5A0jpBrpyzDRILDGeuh5L9IoUCbDE1wgLWe4xC
      

      (in master.info), look the password is now truncated.

      Attachments

        Activity

          illuusio Tuukka Pasanen added a comment - - edited

          Thank you for report and could you fill which Debian version. So I can try to replicate this easier.

          illuusio Tuukka Pasanen added a comment - - edited Thank you for report and could you fill which Debian version. So I can try to replicate this easier.
          illuusio Tuukka Pasanen added a comment - - edited

          Please provide Debian/Ubuntu version was in use

          illuusio Tuukka Pasanen added a comment - - edited Please provide Debian/Ubuntu version was in use

          Hi,

          In https://mariadb.com/kb/en/change-master-to/ it mentions "The maximum length of the MASTER_PASSWORD string is 32 characters.".

          In this case the file will have been read by MariaDB Server and truncated at that point (the read segment only reads around 41 characters). Then the truncated version will have been written out when the file was updated.

          Please for now use a smaller password and please feel free to open a feature request to support longer passwords.

          TheLinuxJedi Andrew Hutchings (Inactive) added a comment - Hi, In https://mariadb.com/kb/en/change-master-to/ it mentions "The maximum length of the MASTER_PASSWORD string is 32 characters.". In this case the file will have been read by MariaDB Server and truncated at that point (the read segment only reads around 41 characters). Then the truncated version will have been written out when the file was updated. Please for now use a smaller password and please feel free to open a feature request to support longer passwords.

          the exact version :

          No LSB modules are available.
          Distributor ID:	Debian
          Description:	Debian GNU/Linux 11 (bullseye)
          Release:	11
          Codename:	bullseye
          uname -a
          Linux gcp-prod-oos-sql-0001-mariadb-g01-001 5.10.0-19-cloud-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux
          

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - the exact version : No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye uname -a Linux gcp-prod-oos-sql- 0001 -mariadb-g01- 001 5.10 . 0 - 19 -cloud-amd64 # 1 SMP Debian 5.10 . 149 - 2 ( 2022 - 10 - 21 ) x86_64 GNU/Linux

          dmidecode -s system-product-name
          Google Compute Engine
          

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - dmidecode -s system-product-name Google Compute Engine
          markus makela markus makela added a comment - - edited

          The problem appears to be on line 500 in rpl_mi.cc:

                  init_strvar_from_file(mi->password, SCRAMBLED_PASSWORD_CHAR_LENGTH+1,
                                        &mi->file, 0) ||
          

          SCRAMBLED_PASSWORD_CHAR_LENGTH+1 expands to 20 * 2 + 1 which would be OK if the password was stored in its hashed form but since it's in plaintext form, the length should be 96 to allow 32 character passwords in multi-byte character sets to be used (MDEV-4013 seems to have added support for them).

          markus makela markus makela added a comment - - edited The problem appears to be on line 500 in rpl_mi.cc : init_strvar_from_file(mi->password, SCRAMBLED_PASSWORD_CHAR_LENGTH+1, &mi->file, 0) || SCRAMBLED_PASSWORD_CHAR_LENGTH+1 expands to 20 * 2 + 1 which would be OK if the password was stored in its hashed form but since it's in plaintext form, the length should be 96 to allow 32 character passwords in multi-byte character sets to be used ( MDEV-4013 seems to have added support for them).

          we should return an error when we set a password more than 32 no ?

          Aurelien_LEQUOY Aurélien LEQUOY added a comment - we should return an error when we set a password more than 32 no ?

          People

            Elkin Andrei Elkin
            Aurelien_LEQUOY Aurélien LEQUOY
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.