[CONJ-615] pluggable authentication escaping Created: 2018-05-30  Updated: 2021-02-08  Resolved: 2021-02-08

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

Authentication can have first byte :

  • 0xff for ERROR_PACKET
  • 0xfe for authentication switch.
    When in a plugin authentication, those bytes are escaped to avoid any confusion :

else if (packet_len > 0 && (*packet == 1 || *packet == 255 || *packet == 254))
  {
    /*
      we cannot allow plugin data packet to start from 255 or 254 -
      as the client will treat it as an error or "change plugin" packet.
      We'll escape these bytes with \1. Consequently, we
      have to escape \1 byte too.
    */

The connector must remove unescape byte accordingly

Documentation must be updated too to take care of this.



 Comments   
Comment by Vladislav Vaintroub [ 2018-05-30 ]

unescaping is just removing the first 0x01 byte

Comment by Diego Dupin [ 2021-02-08 ]

Closing, since taken care since long time

Generated at Thu Feb 08 03:17:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.