{"id":174,"date":"2010-04-08T21:32:30","date_gmt":"2010-04-09T02:32:30","guid":{"rendered":"http:\/\/somethingdoug.com\/thoughts\/?p=174"},"modified":"2010-04-08T21:32:30","modified_gmt":"2010-04-09T02:32:30","slug":"important-bug-fix-in-authen-cas-external-0-06","status":"publish","type":"post","link":"https:\/\/somethingdoug.com\/thoughts\/2010\/04\/08\/important-bug-fix-in-authen-cas-external-0-06\/","title":{"rendered":"Important Bug Fix in Authen::CAS::External 0.06"},"content":{"rendered":"<p>Earlier today I released an important bug fix to my distribution <a href=\"http:\/\/search.cpan.org\/dist\/Authen-CAS-External\/\">Authen-CAS-External<\/a> (under version 0.06). The bug caused the distribution to fail on CAS deployments where the application was not deployed at the root URL (i.e. https:\/\/cas.domain.com\/login worked fine, but https:\/\/cas.domain.com\/cas\/login did not work at all). The reason was because the LWP::UserAgent handler rules had <code>m_path_match<\/code> set to a static <code>qr{\\A \/login}msx<\/code>, which clearly would only match pages where <code>login<\/code> was at the root, which is not always the case. This was fixed by storing the path to login in the variable <code>$cas_path<\/code> and then changing the path match to <code>qr{\\A \\Q$cas_path\\E}msx<\/code>. Note the <code>\\Q<\/code> and <code>\\E<\/code> are important so that the regular expression properly treats the path as a static string. The full patch can be seen in <a href=\"http:\/\/github.com\/dougwilson\/perl5-authen-cas-external\/commit\/df8ef3b03bfff370ac44e68bb72b6086987b5ca0\">commit df8ef3b<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier today I released an important bug fix to my distribution Authen-CAS-External (under version 0.06). The bug caused the distribution to fail on CAS deployments where the application was not deployed at the root URL (i.e. https:\/\/cas.domain.com\/login worked fine, but https:\/\/cas.domain.com\/cas\/login did not work at all). The reason was because the LWP::UserAgent handler rules had [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[12,19],"class_list":["post-174","post","type-post","status-publish","format-standard","hentry","category-perl","tag-cpan","tag-perl5"],"_links":{"self":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":4,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":178,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/posts\/174\/revisions\/178"}],"wp:attachment":[{"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/somethingdoug.com\/thoughts\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}