darcs patch: add_field_names_to_set_assoc_in_mysqlstore
Wes Morgan
wmorgan at ffpir.org
Fri Feb 29 08:32:16 PST 2008
I should explain the impetus for this patch a little. OpenID is an
inherently integrated technology. (I.e. it derives its usefulness from
being integrated into existing systems.) As we're probably all aware,
existing systems are not always ideal environments, they come with
technological and policy baggage all their own.
One particular project I'm a contributor to (CiviCRM), has systems and
policies in place that dictate that every database table have a single
field primary key. As such, I can't use the OpenID MySQLStore as-is in
this system.
But the good news is, the very small, very non-intrusive patch below
fixes the problem. Because it specifies the fields it's inserting data
to, it doesn't matter if the database table has extra fields, as long
as it has at least these. (And then you can create an index on the
former compound primary key.)
This patch should have zero effect on existing configurations, and can
only help situations like mine (which I'm almost certainly not alone
in).
Can this patch be included?
Thanks for your time.
Wes
On Feb 29, 2008, at 7:58 AM, dev-request at lists.openidenabled.com wrote:
>
>
> Message: 1
> Date: Fri, 22 Feb 2008 16:17:41 -0700
> From: Wes Morgan <wmorgan at ffpir.org>
> Subject: darcs patch: add_field_names_to_set_assoc_in_mysqlstore
> To: dev at lists.openidenabled.com
> Message-ID: <FE9CD2C5-2E02-4877-80B1-6574906C985F at ffpir.org>
> Content-Type: text/plain; charset="us-ascii"
>
> * add_field_names_to_set_assoc_in_mysqlstore
>
> New patches:
>
> [add_field_names_to_set_assoc_in_mysqlstore
> Wes Morgan <wmorgan at ffpir.org>**20080222230248] {
> hunk ./Auth/OpenID/MySQLStore.php 45
> - "REPLACE INTO %s VALUES (?, ?, !, ?, ?, ?)";
> + "REPLACE INTO %s (server_url, handle, secret, issued,\n".
> + " lifetime, assoc_type) VALUES (?, ?, !, ?, ?, ?)";
> }
>
> Context:
>
> [TAG 2.0.1
> cygnus at janrain.com**20080220220619]
> [Remove "warning" text from output of store tests
> cygnus at janrain.com**20080220213956]
> [Use PATH_SEPARATOR in detect.php (thanks: http://jeroen.hellingman.myopenid.com/)
> cygnus at janrain.com**20080219234601]
> [Add conditional check for CURLOPT_NOSIGNAL (thanks: http://ols2000.myopenid.com/)
> cygnus at janrain.com**20080219234326]
> [Skip HMAC-SHA256 test if not supported
> cygnus at janrain.com**20080207214000]
> [Remove stale getAssocArgs
> cygnus at janrain.com**20080207212211]
> [Add HMAC-SHA256 to plaintext consumer session assoc types
> cygnus at janrain.com**20080207211908]
> [Generalize Auth_OpenID_Association::sign()
> cygnus at janrain.com**20080204200901]
> [Change output when skipping memcached tests: warnings upset buildbot
> cygnus at janrain.com**20080204195821]
> [Whitespace
> cygnus at janrain.com**20080204195753]
> [Pass instead of fail on failed memcached connection
> cygnus at janrain.com**20080204195735]
> [Enable (HMAC)SHA256 tests; why did we disable them?
> cygnus at janrain.com**20080204195723]
> [hmac-sha256-test
> harningt at gmail.com**20080202065307]
> [support-hmacsha256
> harningt at gmail.com**20080202063443]
> [Implementation of Memcached storage in PHP. This patch also includes
> supportsCleanup() function for OpenIDStore interface, as memcache
> doesn't allow
> me at arty.name**20080202194709
> enumeration of all keys used (and cleans itself).
>
> Also included test for memcached storage and support for
> supportsCleanup() in test functions.
> ]
> [Failed DB connection is not a fail of test, typo in PG storage test
> me at arty.name**20080202183503]
> [Fix user XRDS
> cygnus at janrain.com**20080204180559]
> [Fix IDP XRDS in example server: advertise correct type
> cygnus at janrain.com**20080204175339]
> [Fix reference-passing style for PHP 5
> cygnus at janrain.com**20080129054357]
> [ParanoidHTTPFetcher.php (supportsSSL): Updated to work under PHP 4.
> joel at pbwiki.com**20080124041253
> The official documentation lies, curl_version() returns an array in
> PHP 5 and a string in PHP 4.
> ]
> [Auth_OpenID_AX_FetchResponse::getExtensionArgs takes request by
> value, defaults to null
> cygnus at janrain.com**20080116184239]
> [Fixing documentation
> sam.alexander at vidoop.com**20080116174448]
> [Refactored HTML-parsing code to avoid PCRE limits on large matches
> cygnus at janrain.com**20080103000827]
> [Remove PHP5ism (stripos())
> cygnus at janrain.com**20071231191841]
> [Store test: remove correct sqlite database file
> cygnus at janrain.com**20071231184207]
> [Fixed discovery failure due to case-sensitive comparison of
> 'Location:' header
> Trevor Johns <trevor at tjohns.net>**20071230015002
>
> If an HTTP redirect was issued during discovery with a 'Location:'
> header that
> doesn't exactly match case (such as 'location:' or 'LOCATION:'),
> discovery
> would fail. This is incorrect behavior per RFC 2616, Section 4.2.
>
> This behavior is corrected by using a case insensitive compare when
> checking
> for HTTP redirects.
> ]
> [Removed unused $http_response from Auth_Yadis_Manager
> Trevor Johns <trevor at tjohns.net>**20071229223813]
> [Fixed typo and minor formatting changes for StoreTest.
> Trevor Johns <trevor at tjohns.net>**20071229214829
>
> - Removed extra newline.
> - Changed comment in test_sqlitestore() to read 'sqlite' instead of
> 'postgres'.
> ]
> [Fixed StoreTest to not fail on Mac OS X 10.5
> Trevor Johns <trevor at tjohns.net>**20071229084113
>
> Mac OS X 10.5 generates a value for $TMPDIR that looks something like
> this:
>
> /var/folders/uU/uXMNhbRIGkOhaxcg60xSGU+++TI/-Tmp-/
>
> The '+++' is causing the DSN in
> Tests_Auth_OpenID_StoreTest::test_sqlitestore
> to become invalid. This invalid DSN causes the SQLite driver to
> attempt
> creating a file at a nonexistant path, resulting in a failed test.
> This is
> fixed by wrapping the value of $TMPDIR received by the system in a
> call to
> urlencode().
> ]
> [Update admin scripts to run under Mac OS X
> Trevor Johns <trevor at tjohns.net>**20071229081729
>
> The scripts in admin use several non-POSIX arguments which do not work
> on Mac
> OS X. See my original post to dev at openidenabled.com:
>
> message://%3C5902A542-C723-4F0A-8478-1F33C874D1B8@tjohns.net%3E
>
> http://lists.openidenabled.com/pipermail/dev/2007-December/000979.html
>
> This patch makes the following changes to fix this:
>
> - Changed $HERE in admin/runtests to avoid calling readlink.
> - Calls to xargs now use '-L 1' instead of '-l1'.
> - Calls to 'wc -L' were eliminated.
> ]
> [Typo in SReg docblock
> sam.alexander at vidoop.com**20071220222957]
> [use-time-instead-of-(gm)mktime
> dAniel hAhler <php-openid at thequod.de>**20071208234037
> Use time() instead of (gm)mktime(), when used for getting the current
> time (called without arguments).
> According to "hunk ./Auth/OpenID/Nonce.php 99" gmmktime() for PHP4 is
> buggy and using mktime() makes no sense when called without args:
> just use time() then directly.
> ]
> [TAG 2.0.0
> cygnus at janrain.com**20071205215515]
> Patch bundle hash:
> 9c74f193bfbfa8e5fbc31748640271c16e1fae28
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.openidenabled.com/pipermail/dev/attachments/20080222/1f44387f/attachment.html
>
--------------------------------------------------------
Wes Morgan
Internet Organizer
Code for Change Director
Fund for Public Interest Research
wmorgan at ffpir.org
303-573-5885 ext. 312
1536 Wynkoop St., Ste. 100
Denver, CO 80202
More information about the Dev
mailing list