Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author ktbartholomew

    (@ktbartholomew)

    Have you checked the file path it mentions to see if the certificate file is there?

    Thread Starter Aaron Wagner

    (@ajwagner777)

    Well it actually looks like two paths concatenated together:

    C:\inetpub\development\content\plugins\saml-20-single-sign-on\saml/cert/C:\inetpub\development/content/uploads/saml-20-single-sign-on/etc/certs/1/1.cer

    The first of the paths is invalid, there is not a cert directory, instead it is certs.

    The certificate and key exist at:

    C:\inetpub\development\content\uploads\saml-20-single-sign-on\etc\certs\1

    And are IIS readable.

    Plugin Author ktbartholomew

    (@ktbartholomew)

    Are you setting the custom content directory with a directive in wp-config.php? Would you mind sharing that line if so? it’s kind of an edge case, so I probably haven’t fully accounted for the way you’re using it.

    Thread Starter Aaron Wagner

    (@ajwagner777)

    Sure. Here’s the entry in the wp-config:

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/content' );
    define( 'WP_CONTENT_URL', 'https://'.DOMAIN_CURRENT_SITE.'/content');
    Plugin Author ktbartholomew

    (@ktbartholomew)

    Hey Aaron,

    The problem you were having is from deep in the SimpleSAMLPHP Library, which has a function that assumes absolute paths will only ever begin with a forward slash. This is true for Linux, but not Windows.

    I’ll patch this soon, but in the meantime, you could apply the patch yourself in /content/plugins/saml-20-single-sign-on/saml/lib/SimpleSAML/Utilities.php, line 1088 or so.

    Replace the if/else structure you find in that function with this:

    /* Check for absolute path. */
    		if(substr($path, 0, 1) === '/') {
    			/* Absolute path. */
    			return $path;
    		}
    		/* Check for Windows absolute path. */
    		elseif( preg_match('/([a-zA-Z]:|\\\\[a-zA-Z0-9])/', substr($path, 0, 3) ) ) {
    			/* Either a a drive letter or Windows Share */
    			return $path;
    		}
    		else {
    			/* Path relative to base. */
    			$ret = $base;
    		}

    I’ve just quickly tested this in an AWS instance I threw together today, so I would appreciate your feedback on whether this works for you or not.

    For what it’s worth, I had exactly the same problem today with the missing SAML info. Replacing that line in the Utilities.php file does seem to have fixed it for me.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Empty SAML Info (Windows IIS Host)’ is closed to new replies.