• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

AD password issue

Scheduled Pinned Locked Moved
FOG Problems
2
2
308
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    Lenain
    last edited by May 13, 2022, 2:34 PM

    Hello,
    I have change my AD password and put an apostrophe (') in it, since I have issue with it. When I change something in “general” or “active directory” the password is change in mysql, the apostrophe is replaced by “'”.

    R 1 Reply Last reply May 14, 2022, 10:13 PM Reply Quote 0
    • R
      RogerBrownTDL @Lenain
      last edited by RogerBrownTDL May 14, 2022, 4:16 PM May 14, 2022, 10:13 PM

      @lenain said in AD password issue:

      '

      Is the “&#039:”. giving a problem? MYSQL is typing it that way as a HTML code. I have no coding knowledge nor do I know MYSQL very well but this may be of some use:
      Source:
      https://stackoverflow.com/questions/9596652/how-to-escape-apostrophe-in-mysql
      Quote:
      Possibly off-topic, but maybe you came here looking for a way to sanitise text input from an HTML form, so that when a user inputs the apostrophe character, it doesn’t throw an error when you try to write the text to an SQL-based table in a DB. There are a couple of ways to do this, and you might want to read about SQL injection too. Here’s an example of using prepared statements and bound parameters in PHP:

      $input_str = “Here’s a string with some apostrophes (')”;
      // sanitise it before writing to the DB (assumes PDO)
      $sql = “INSERT INTO table (note) VALUES (:note)”;
      try {
      $stmt = $dbh->prepare($sql);
      $stmt->bindParam(‘:note’, $input_str, PDO::PARAM_STR);
      $stmt->execute();
      } catch (PDOException $e) {
      return $dbh->errorInfo();
      }
      return “success”;
      In the special case where you may want to store your apostrophes using their HTML entity references, PHP has the htmlspecialchars() function which will convert them to “&#039 ;”. As the comments indicate, this should not be used as a substitute for proper sanitisation, as per the example given.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      1 / 1
      • First post
        2/2
        Last post

      198

      Online

      12.1k

      Users

      17.3k

      Topics

      155.3k

      Posts
      Copyright © 2012-2024 FOG Project