Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[BUG] SimplePie_URI #81

Closed
studela opened this Issue · 9 comments

6 participants

@studela

In my project, the cache location is stored in MySQL database. The password used to connect begins for the character: ?

Example: mysql://myuser:?mypass@myhost:3306/myschema

When the class SimplePie_IRI calls to the method parse_iri, the next regular expression fail:

preg_match (' / ^ (([^:\/? *] +):)? (\/\ / ([^\/? *] *))? ([^? *] *) (\? ([^ *] *))? (* (. *))? $ / ', $iri, $match);

The variable returned is not well formed. The regexp should be checked.

@Anzel-zz

It's happened to me too. But the password doesn't need begins with ?, the error is produced if password contains the ? character.

@fmgonzalez

It also happens to me. It was an issue hard to find.

@rmccue
Owner

If possible, can you fix the regex? If you can, let me know and I'll write tests and include it in SP, otherwise you'll have to wait until I can get around to it. :)

@gsnedders
Owner

I guess we shouldn't try and treat it as a URL…

@rmccue
Owner

Sounds like a good idea to me.

@rmccue
Owner

I'm in favour of switching to PDO, and simply using DSNs instead. gsnedders?

@gsnedders
Owner

That was my favoured solution at the time, but PHP4-compat requirement rather killed that.

@rmccue
Owner

Fixed for 1.3 in simplepie@0254b69

Note that this is an API breakage. It now expects a PDO DSN, and you must have PDO and PDO_MySQL enabled. An example DSN is given in the commit message.

@sergiotudela

Thanks !

I'll try this new version. I confirm to you then.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.