From 1d28b2835eaed8080ab512fa4c1918af86c38626 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Mon, 11 May 2015 10:18:31 -0400 Subject: [PATCH] Updated ReCaptcha support to use new API version. --- composer.json | 2 +- composer.lock | 137 +- config/vufind/config.ini | 13 +- languages/ca.ini | 11 - languages/cs.ini | 11 - languages/cy.ini | 11 - languages/da.ini | 11 - languages/de.ini | 11 - languages/el.ini | 11 - languages/en.ini | 11 - languages/es.ini | 11 - languages/eu.ini | 11 - languages/fi.ini | 11 - languages/fr.ini | 11 - languages/it.ini | 11 - languages/ja.ini | 11 - languages/nl.ini | 11 - languages/pl.ini | 11 - languages/pt-br.ini | 11 - languages/pt.ini | 11 - languages/ru.ini | 11 - languages/sl.ini | 11 - languages/sv.ini | 11 - languages/tr.ini | 11 - languages/zh-cn.ini | 11 - languages/zh.ini | 11 - .../VuFind/Controller/Plugin/Recaptcha.php | 38 +- module/VuFind/src/VuFind/Service/Factory.php | 49 +- .../src/VuFind/View/Helper/Root/Recaptcha.php | 44 +- .../templates/Auth/Database/recovery.phtml | 6 +- .../templates/Helpers/email-form-fields.phtml | 6 +- .../templates/Service/recaptcha.phtml | 38 - .../templates/myresearch/newpassword.phtml | 6 +- themes/bootstrap3/templates/record/sms.phtml | 6 +- themes/root/templates/Service/recaptcha.phtml | 35 - vendor/autoload.php | 2 +- vendor/composer/autoload_classmap.php | 6 + vendor/composer/autoload_namespaces.php | 2 +- vendor/composer/autoload_psr4.php | 1 + vendor/composer/autoload_real.php | 8 +- vendor/composer/include_paths.php | 8 +- vendor/composer/installed.json | 1445 +++++++++-------- vendor/los/losrecaptcha/LICENSE | 28 + vendor/los/losrecaptcha/Module.php | 7 + vendor/los/losrecaptcha/autoload_classmap.php | 10 + vendor/los/losrecaptcha/composer.json | 36 + .../los/losrecaptcha/config/module.config.php | 8 + .../src/LosReCaptcha/Captcha/ReCaptcha.php | 129 ++ .../Form/View/Helper/Captcha/ReCaptcha.php | 131 ++ .../losrecaptcha/src/LosReCaptcha/Module.php | 46 + .../src/LosReCaptcha/Service}/Exception.php | 2 +- .../src/LosReCaptcha/Service}/ReCaptcha.php | 166 +- .../src/LosReCaptcha/Service}/Response.php | 25 +- .../zendservice-recaptcha/.gitignore | 1 - .../zendservice-recaptcha/.travis.yml | 17 - .../zendservice-recaptcha/LICENSE.txt | 27 - .../zendservice-recaptcha/README.md | 11 - .../zendservice-recaptcha/composer.json | 33 - .../ZendService/ReCaptcha/MailHide.php | 328 ---- .../ReCaptcha/MailHideException.php | 21 - .../zendservice-recaptcha/tests/Bootstrap.php | 92 -- .../tests/TestConfiguration.php.dist | 55 - .../tests/TestConfiguration.php.travis | 20 - .../ZendService/ReCaptcha/MailHideTest.php | 151 -- .../ZendService/ReCaptcha/ReCaptchaTest.php | 303 ---- .../ZendService/ReCaptcha/ResponseTest.php | 103 -- .../zendservice-recaptcha/tests/_autoload.php | 40 - .../tests/phpunit.xml.dist | 13 - 68 files changed, 1395 insertions(+), 2513 deletions(-) delete mode 100644 themes/bootstrap3/templates/Service/recaptcha.phtml delete mode 100644 themes/root/templates/Service/recaptcha.phtml create mode 100644 vendor/los/losrecaptcha/LICENSE create mode 100644 vendor/los/losrecaptcha/Module.php create mode 100644 vendor/los/losrecaptcha/autoload_classmap.php create mode 100644 vendor/los/losrecaptcha/composer.json create mode 100644 vendor/los/losrecaptcha/config/module.config.php create mode 100644 vendor/los/losrecaptcha/src/LosReCaptcha/Captcha/ReCaptcha.php create mode 100644 vendor/los/losrecaptcha/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php create mode 100644 vendor/los/losrecaptcha/src/LosReCaptcha/Module.php rename vendor/{zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha => los/losrecaptcha/src/LosReCaptcha/Service}/Exception.php (93%) rename vendor/{zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha => los/losrecaptcha/src/LosReCaptcha/Service}/ReCaptcha.php (73%) rename vendor/{zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha => los/losrecaptcha/src/LosReCaptcha/Service}/Response.php (86%) delete mode 100644 vendor/zendframework/zendservice-recaptcha/.gitignore delete mode 100644 vendor/zendframework/zendservice-recaptcha/.travis.yml delete mode 100644 vendor/zendframework/zendservice-recaptcha/LICENSE.txt delete mode 100644 vendor/zendframework/zendservice-recaptcha/README.md delete mode 100644 vendor/zendframework/zendservice-recaptcha/composer.json delete mode 100644 vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHide.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHideException.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/Bootstrap.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.dist delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.travis delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/MailHideTest.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ReCaptchaTest.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ResponseTest.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/_autoload.php delete mode 100644 vendor/zendframework/zendservice-recaptcha/tests/phpunit.xml.dist diff --git a/composer.json b/composer.json index d1b6aa54ce9..22a8a2b5c6e 100644 --- a/composer.json +++ b/composer.json @@ -50,6 +50,7 @@ "aferrandini/phpqrcode": "1.0.1", "jasig/phpcas": "*", "johnwohlers/sip2": "dev-master", + "los/losrecaptcha": "*", "mobileesp/mdetect": "dev-master", "ocramius/proxy-manager": "*", "oyejorge/less.php": "*", @@ -63,7 +64,6 @@ "zendframework/zendframework": "2.3.7", "zendframework/zendrest": "2.*", "zendframework/zendservice-amazon": "2.*", - "zendframework/zendservice-recaptcha": "2.*", "zf-commons/zfc-rbac": "~2.4" }, "require-dev": { diff --git a/composer.lock b/composer.lock index cde083896ee..f075b5f2d49 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ad7918adabede04ad206b2d095d581db", + "hash": "17e060af5c8424a9e99315284a8a3632", "packages": [ { "name": "aferrandini/phpqrcode", @@ -119,6 +119,66 @@ ] } }, + { + "name": "los/losrecaptcha", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/Lansoweb/LosReCaptcha.git", + "reference": "2e18af8d57286c28c1951c7305f8379e7304b203" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Lansoweb/LosReCaptcha/zipball/2e18af8d57286c28c1951c7305f8379e7304b203", + "reference": "2e18af8d57286c28c1951c7305f8379e7304b203", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "zendframework/zendframework": ">=2.3.2,<3.0.0" + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "suggest": { + "los/losbase": "los/losbase for some abstract classes to speed development ", + "los/loslog": "los/loslog for logging", + "los/losui": "los/losui for twitter bootstrap 3 styling, jquery, chosen and other libraries" + }, + "type": "library", + "autoload": { + "psr-4": { + "LosReCaptcha\\": "src/" + }, + "psr-0": { + "LosReCaptcha\\": "src/" + }, + "classmap": [ + "./" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Leandro Silva", + "email": "leandro@leandrosilva.info", + "homepage": "http://leandrosilva.info" + } + ], + "description": "ZF2 module for integration with new ReCaptcha service form Google", + "homepage": "http://github.com/Lansoweb/LosReCaptcha", + "keywords": [ + "captcha", + "los", + "module", + "recaptcha", + "zf2" + ], + "time": "2015-04-28 15:40:23" + }, { "name": "mobileesp/mdetect", "version": "dev-master", @@ -339,6 +399,9 @@ "include-path": [ "/" ], + "license": [ + "GNU Lesser General Public License" + ], "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called \"php-marc\", that is part of the Emilda Project (http://www.emilda.org). Christoffer Landtman generously agreed to make the \"php-marc\" code available under the GNU LGPL so it could be used as the basis of this PEAR package." }, { @@ -375,6 +438,9 @@ "include-path": [ "/" ], + "license": [ + "New BSD License" + ], "description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks" }, { @@ -430,6 +496,9 @@ "include-path": [ "/" ], + "license": [ + "New BSD" + ], "description": "Package to validate various datas. It includes :\n - numbers (min/max, decimal or not)\n - email (syntax, domain check, rfc822)\n - string (predifined type alpha upper and/or lowercase, numeric,...)\n - date (min, max, rfc822 compliant)\n - uri (RFC2396)\n - possibility valid multiple data with a single method call (::multiple)" }, { @@ -457,6 +526,9 @@ "include-path": [ "/" ], + "license": [ + "New BSD" + ], "description": "Package containes ISPN (International Standard Product Numbers) validations such as:\n * ISSN\n * ISBN\n * ISMN\n * ISRC (International Standard Recording Code)\n * EAN8\n * EAN13\n * EAN14\n * UCC12\n * SSCC" }, { @@ -665,7 +737,7 @@ "dist": { "type": "zip", "url": "https://packages.zendframework.com/composer/zendframework-zendframework-a1aae5fdd27a422beb32c56ddf5a197654a0f94a-zip-06d4c7.zip", - "reference": "2.3.7", + "reference": "a1aae5fdd27a422beb32c56ddf5a197654a0f94a", "shasum": "7033dd58d94b0c75fae8a00001f8a7275c218209" }, "require": { @@ -760,6 +832,11 @@ "Zend\\": "library/" } }, + "autoload-dev": { + "psr-0": { + "ZendTest\\": "tests/" + } + }, "license": [ "BSD-3-Clause" ], @@ -786,7 +863,7 @@ "dist": { "type": "zip", "url": "https://packages.zendframework.com/composer/zendframework-zendrest-7427d242b4546e5aef1206d2c97e402109d8843e-zip-da96cc.zip", - "reference": "2.0.2", + "reference": "7427d242b4546e5aef1206d2c97e402109d8843e", "shasum": "cd304d9e2fccccbd98348bfbead7d42b102e565a" }, "require": { @@ -827,7 +904,7 @@ "dist": { "type": "zip", "url": "https://packages.zendframework.com/composer/zendframework-zendservice-amazon-f3d44e3488908323c34bf040c045ee71e1196796-zip-31bbc0.zip", - "reference": "2.0.3", + "reference": "f3d44e3488908323c34bf040c045ee71e1196796", "shasum": "b7f77cced220f6738248fc827952ab2c6604a08f" }, "require": { @@ -874,52 +951,6 @@ }, "time": "2014-03-05 22:37:42" }, - { - "name": "zendframework/zendservice-recaptcha", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/ZendService_ReCaptcha.git", - "reference": "4324cca8502d9f47b3b43a18acdd3fdbeb965536" - }, - "dist": { - "type": "zip", - "url": "https://packages.zendframework.com/composer/zendframework-zendservice-recaptcha-4324cca8502d9f47b3b43a18acdd3fdbeb965536-zip-8c45bf.zip", - "reference": "2.0.1", - "shasum": "fab92465cda889ff975c1ec79bb378d7e3f39081" - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-http": ">=2.0.0", - "zendframework/zend-uri": ">=2.0.0", - "zendframework/zend-version": ">=2.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "ZendService": "library/" - } - }, - "license": [ - "BSD-3-Clause" - ], - "description": "OOP wrapper for the ReCaptcha web service", - "homepage": "http://packages.zendframework.com/", - "keywords": [ - "recaptcha", - "zf2" - ], - "support": { - "source": "https://github.com/zendframework/ZendService_ReCaptcha/tree/release-2.0.1", - "issues": "https://github.com/zendframework/ZendService_ReCaptcha/issues" - }, - "time": "2012-09-24 15:18:29" - }, { "name": "zendframework/zendxml", "version": "1.0.0", @@ -931,7 +962,7 @@ "dist": { "type": "zip", "url": "https://packages.zendframework.com/composer/zendframework-zendxml-559b34f426d33a11c3db118e00ce14bb8dc64e5f-zip-6cf7a2.zip", - "reference": "1.0.0", + "reference": "559b34f426d33a11c3db118e00ce14bb8dc64e5f", "shasum": "39abc614b5c26bcbf8102e203c52dee73c4460a8" }, "require": { @@ -1156,12 +1187,12 @@ "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/Behat/MinkZombieDriver.git", + "url": "https://github.com/minkphp/MinkZombieDriver.git", "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/MinkZombieDriver/zipball/cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", + "url": "https://api.github.com/repos/minkphp/MinkZombieDriver/zipball/cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", "shasum": "" }, diff --git a/config/vufind/config.ini b/config/vufind/config.ini index 6f8e785e4b6..83bc972036b 100644 --- a/config/vufind/config.ini +++ b/config/vufind/config.ini @@ -1174,15 +1174,14 @@ treeSearchLimit = 100 ; Activate Captcha validation on select forms ; VuFind will use reCaptcha validation to prevent bots from using certain actions of -; your instance. See http://www.google.com/recaptcha for more information on reCaptcha +; your instance. See http://www.google.com/recaptcha for more information on Captcha ; and create keys for your domain. +; You will need to provide a sslcapath in the [Http] section for your Captcha to work. ;[Captcha] -;publicKey = "get your reCaptcha key at" -;privateKey = "https://www.google.com/recaptcha/admin/create" -; Valid theme values: red, white, blackglass, clean, custom -; If using a custom theme, modify/override/style Service/recaptcha.phtml -; Documentation: https://developers.google.com/recaptcha/docs/customization -;theme = red +;siteKey = "get your reCaptcha key at" +;secretKey = "https://www.google.com/recaptcha/admin/create" +; Valid theme values: dark, light +;theme = light ; Valid forms values: changePassword, email, newAccount, passwordRecovery, sms ; Use * for all supported forms ;forms = changePassword, email, newAccount, passwordRecovery, sms diff --git a/languages/ca.ini b/languages/ca.ini index 6aee81cd5e6..c285cefc18e 100644 --- a/languages/ca.ini +++ b/languages/ca.ini @@ -722,18 +722,7 @@ Range = "Rang" Range slider = "Rang mòbil" Read the full review online... = "Llegiu la resenya completa en lÃnia..." Recall This = "Reclamar aquest" -recaptcha_audio_challenge = "Obteniu una pista sonora" -recaptcha_cant_hear_this = "Baixa el so com a MP3" -recaptcha_help_btn = "Ajuda" -recaptcha_image_alt_text = "Imatge del repte de reCAPTCHA" -recaptcha_incorrect_try_again = "No és correcte. Torna-ho a provar." -recaptcha_instructions_audio = "Escriviu el que escolteu:" -recaptcha_instructions_visual = "Escriviu el text:" recaptcha_not_passed = "CAPTCHA invà lid" -recaptcha_play_again = "Torna a reproduir el so" -recaptcha_privacy_and_terms = "Privadesa i condicions" -recaptcha_refresh_btn = "Obteniu una pista nova" -recaptcha_visual_challenge = "Obtén un repte visual" Record Citations = "Cites del registre" Record Count = "Número de registres" Recover Account = "S'ha oblidat el seu compte/contrasenya?" diff --git a/languages/cs.ini b/languages/cs.ini index cc0c301503f..cd5b258c1e3 100644 --- a/languages/cs.ini +++ b/languages/cs.ini @@ -709,18 +709,7 @@ Range = "RozmezÃ" Range slider = "VýbÄ›r rozsahu" Read the full review online... = "PÅ™eÄÃst celou recenzi online..." Recall This = "Rezervovat" -recaptcha_audio_challenge = "PÅ™ehrát zvukovou podobu výrazu" -recaptcha_cant_hear_this = "Stáhnout zvuk ve formátu MP3" -recaptcha_help_btn = "NápovÄ›da" -recaptcha_image_alt_text = "Obrázek reCAPTCHA" -recaptcha_incorrect_try_again = "Å patnÄ›. Zkuste to znovu." -recaptcha_instructions_audio = "NapiÅ¡te, co jste slyÅ¡eli:" -recaptcha_instructions_visual = "Zadejte text:" recaptcha_not_passed = "Kód CAPTCHA nesouhlasÃ." -recaptcha_play_again = "Znovu pÅ™ehrát zvuk" -recaptcha_privacy_and_terms = "Ochrana soukromà a smluvnà podmÃnky" -recaptcha_refresh_btn = "Zobrazit nový výraz" -recaptcha_visual_challenge = "Zobrazit vizuálnà podobu výrazu" Record Citations = "Citace záznamu" Record Count = "PoÄet záznamů" Recover Account = "Obnovit úÄet" diff --git a/languages/cy.ini b/languages/cy.ini index 7a437dde40e..fcc1fa02665 100644 --- a/languages/cy.ini +++ b/languages/cy.ini @@ -711,18 +711,7 @@ Range = "Amrediad" Range slider = "Detholwr Amrediad" Read the full review online... = "Darllen yr arolwg cyfan ar-lein..." Recall This = "Adalw hwn" -recaptcha_audio_challenge = "Derbyn her awdio" -recaptcha_cant_hear_this = "Lawrlwytho'r sain ar ffurf MP3" -recaptcha_help_btn = "Cymorth " -recaptcha_image_alt_text = "Delwedd her reCAPTCHA " -recaptcha_incorrect_try_again = "Anghywir. Rhowch gynnig arall arni." -recaptcha_instructions_audio = "Teipiwch yr hyn a glywch: " -recaptcha_instructions_visual = "Teipiwch y Testun:" recaptcha_not_passed = "Methwyd y prawf CAPTCHA" -recaptcha_play_again = "Canu'r sain eto. " -recaptcha_privacy_and_terms = "Preifatrwydd a Thelerau" -recaptcha_refresh_btn = "Derbyn her newydd" -recaptcha_visual_challenge = "Derbyn her weledol" Record Citations = "Cofnodi Dyfyniadau" Record Count = "Nifer y Cofnodion" Recover Account = "Adfer Cyfrif" diff --git a/languages/da.ini b/languages/da.ini index a9fe0c0deed..7ba3bcd0b52 100644 --- a/languages/da.ini +++ b/languages/da.ini @@ -498,17 +498,6 @@ Range = "Range" Range slider = "Range slider" Read the full review online... = "Læs den fulde anmeldelse onlineâ€" Recall This = "Hjemkald denne" -recaptcha_audio_challenge = "Hent en lydudfordring" -recaptcha_cant_hear_this = "Download lyd som MP3" -recaptcha_help_btn = "Hjælp" -recaptcha_image_alt_text = "reCAPTCHA-udfordringsbillede" -recaptcha_incorrect_try_again = "Forkert. Prøv igen." -recaptcha_instructions_audio = "Indtast det, du hører:" -recaptcha_instructions_visual = "Indtast teksten:" -recaptcha_play_again = "Afspil lyden igen" -recaptcha_privacy_and_terms = "Privatliv og vilkÃ¥r" -recaptcha_refresh_btn = "Hent en ny udfordring" -recaptcha_visual_challenge = "Hent en visuel udfordring" Record Citations = "Gem citationer" Region = "Region" Related Author = "Relateret forfatter" diff --git a/languages/de.ini b/languages/de.ini index 5ea687576bd..75c18641f7a 100644 --- a/languages/de.ini +++ b/languages/de.ini @@ -710,18 +710,7 @@ Range = "Bereich" Range slider = "Bereichswähler" Read the full review online... = "Die vollständige Rezension online lesen..." Recall This = "Vormerken" -recaptcha_audio_challenge = "Audio-Captcha abrufen" -recaptcha_cant_hear_this = "Wort als MP3 herunterladen" -recaptcha_help_btn = "Hilfe" -recaptcha_image_alt_text = "reCAPTCHA-Bild" -recaptcha_incorrect_try_again = "Falsch. Bitte versuchen Sie es erneut." -recaptcha_instructions_audio = "Geben Sie das Gehörte ein:" -recaptcha_instructions_visual = "Geben Sie den angezeigten Text ein:" recaptcha_not_passed = "CAPTCHA nicht korrekt eingegeben" -recaptcha_play_again = "Wort erneut abspielen" -recaptcha_privacy_and_terms = "Datenschutzerklärung & Nutzungsbedingungen" -recaptcha_refresh_btn = "Neues Captcha abrufen" -recaptcha_visual_challenge = "Captcha abrufen" Record Citations = "Zitate" Record Count = "Satzanzahl" Recover Account = "Zugang zum Konto wiederherstellen" diff --git a/languages/el.ini b/languages/el.ini index 6f40b5b6ff1..9dd0dbadf2a 100644 --- a/languages/el.ini +++ b/languages/el.ini @@ -711,18 +711,7 @@ Range = "ΕÏÏος" Range slider = "ΧειÏιστήÏιο εÏÏους" Read the full review online... = "Διαβάστε ολόκληÏη την κÏιτική online..." Recall This = "Κάντε ανάκληση" -recaptcha_audio_challenge = "Ηχητική Ï€Ïόκληση" -recaptcha_cant_hear_this = "Λήψη ήχου ως ΜΡ3" -recaptcha_help_btn = "Βοήθεια" -recaptcha_image_alt_text = "Εικόνα Ï€Ïόκλησης reCAPTCHA" -recaptcha_incorrect_try_again = "Λάθος. Δοκιμάστε ξανά." -recaptcha_instructions_audio = "ΠληκτÏολογήστε ότι ακοÏτε:" -recaptcha_instructions_visual = "ΠληκτÏολογήστε το κείμενο:" recaptcha_not_passed = "ΛανθασμÎνο CAPTCHA" -recaptcha_play_again = "ΑναπαÏαγωγή ήχου ξανά" -recaptcha_privacy_and_terms = "ΑπόÏÏητο και ÏŒÏοι" -recaptcha_refresh_btn = "ÎÎα Ï€Ïόκληση" -recaptcha_visual_challenge = "Οπτική Ï€Ïόκληση" Record Citations = "ΑναφοÏÎÏ‚ εγγÏαφής" Record Count = "ΑÏιθμός εγγÏαφών" Recover Account = "Ανάκτηση λογαÏιασμοÏ" diff --git a/languages/en.ini b/languages/en.ini index a76a773bc63..bb007928d00 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -728,18 +728,7 @@ Range = "Range" Range slider = "Range slider" Read the full review online... = "Read the full review online..." Recall This = "Recall This" -recaptcha_audio_challenge = "Get an audio challenge" -recaptcha_cant_hear_this = "Download sound as MP3" -recaptcha_help_btn = "Help" -recaptcha_image_alt_text = "reCAPTCHA challenge image" -recaptcha_incorrect_try_again = "Incorrect. Try again." -recaptcha_instructions_audio = "Type what you hear:" -recaptcha_instructions_visual = "Type the text:" recaptcha_not_passed = "CAPTCHA not passed" -recaptcha_play_again = "Play sound again" -recaptcha_privacy_and_terms = "Privacy & Terms" -recaptcha_refresh_btn = "Get a new challenge" -recaptcha_visual_challenge = "Get a visual challenge" Record Citations = "Record Citations" Record Count = "Record Count" Recover Account = "Recover Account" diff --git a/languages/es.ini b/languages/es.ini index d732100ed14..a759633160a 100644 --- a/languages/es.ini +++ b/languages/es.ini @@ -711,18 +711,7 @@ Range = "Rango" Range slider = "Rango de deslizamiento" Read the full review online... = "Leer en lÃnea la crÃtica completa..." Recall This = "Recordar esto" -recaptcha_audio_challenge = "Obtener una pista sonora" -recaptcha_cant_hear_this = "Descargar el sonido en MP3" -recaptcha_help_btn = "Ayuda" -recaptcha_image_alt_text = "Pista de imagen reCAPTCHA" -recaptcha_incorrect_try_again = "Incorrecto. Vuelvalo a intentar." -recaptcha_instructions_audio = "Escribe lo que oiga:" -recaptcha_instructions_visual = "Ingrese el texto:" recaptcha_not_passed = "CAPTCHA inválida" -recaptcha_play_again = "Volver a reproducir el sonido" -recaptcha_privacy_and_terms = "Privacidad y condiciones" -recaptcha_refresh_btn = "Obtener una pista nueva" -recaptcha_visual_challenge = "Obtener una pista visual" Record Citations = "Registro de Citas" Record Count = "Conteo de registro" Recover Account = "Recuperar cuenta" diff --git a/languages/eu.ini b/languages/eu.ini index 79598607f04..2463fdcad7e 100644 --- a/languages/eu.ini +++ b/languages/eu.ini @@ -1307,18 +1307,7 @@ Range = "Maila" Range slider = "Rango de Deslizamiento" Read the full review online... = "Azterketa osoa linean irakurri" Recall This = "Jakinarazi" -recaptcha_audio_challenge = "Eskuratu audio-erronka" -recaptcha_cant_hear_this = "Deskargatu soinua MP3 gisa" -recaptcha_help_btn = "Laguntza" -recaptcha_image_alt_text = "reCAPTCHA erronkaren irudia" -recaptcha_incorrect_try_again = "Ez da zuzena. Saiatu berriro." -recaptcha_instructions_audio = "Idatzi entzuten duzuna:" -recaptcha_instructions_visual = "" recaptcha_not_passed = "CAPTCHA ez da gainditu" -recaptcha_play_again = "Erreproduzitu soinua berriro" -recaptcha_privacy_and_terms = "Pribatutasuna eta baldintzak" -recaptcha_refresh_btn = "Eskuratu erronka berria" -recaptcha_visual_challenge = "Eskuratu ikusizko erronka" Record Citations = "Dokumentuaren aipamena" Record Count = "Erregistro-zenbatzea" recovery_by_email = "Berreskuratu posta elektronikoren bidez" diff --git a/languages/fi.ini b/languages/fi.ini index 04123b9afb3..a32ecf9ee5d 100644 --- a/languages/fi.ini +++ b/languages/fi.ini @@ -718,18 +718,7 @@ Range = "Aikaväli" Range slider = "Välin säätö" Read the full review online... = "Lue arvostelu kokonaisuudessaan..." Recall This = "Tee varaus" -recaptcha_audio_challenge = "Äänivahvistus" -recaptcha_cant_hear_this = "Lataa ääni MP3-tiedostona" -recaptcha_help_btn = "Ohje" -recaptcha_image_alt_text = "reCAPTCHA-kuva" -recaptcha_incorrect_try_again = "Väärin. Yritä uudelleen." -recaptcha_instructions_audio = "Kirjoita kuulemasi:" -recaptcha_instructions_visual = "Kirjoita teksti:" recaptcha_not_passed = "CAPTCHA-tarkistus virheellinen" -recaptcha_play_again = "Toista ääni uudelleen" -recaptcha_privacy_and_terms = "Tietosuoja ja käyttöehdot" -recaptcha_refresh_btn = "Uusi kuva" -recaptcha_visual_challenge = "Kuvavahvistus" Record Citations = "Tietueen sitaatit" Record Count = "Tietueiden lukumäärä" Recover Account = "Palauta tili" diff --git a/languages/fr.ini b/languages/fr.ini index bbc4a1059b0..231e5e31c31 100644 --- a/languages/fr.ini +++ b/languages/fr.ini @@ -710,18 +710,7 @@ Range = "Durée" Range slider = "Slider" Read the full review online... = "Lire l'avis complet en ligne..." Recall This = "Réserver" -recaptcha_audio_challenge = "Test audio" -recaptcha_cant_hear_this = "Télécharger l'audio au format MP3" -recaptcha_help_btn = "Aide" -recaptcha_image_alt_text = "Image reCAPTCHA" -recaptcha_incorrect_try_again = "Incorrect. Veuillez réessayer." -recaptcha_instructions_audio = "Qu'entendez-vous ?" -recaptcha_instructions_visual = "Saisissez le texte :" recaptcha_not_passed = "L'identification du CAPTCHA a échoué" -recaptcha_play_again = "Réécouter" -recaptcha_privacy_and_terms = "Confidentialité et conditions d'utilisation" -recaptcha_refresh_btn = "Nouveau test" -recaptcha_visual_challenge = "Test visuel" Record Citations = "Citations de notices" Record Count = "Nombre d'enregistrements" Recover Account = "Récupérer le compte" diff --git a/languages/it.ini b/languages/it.ini index 645dba2fd56..25420dd401a 100644 --- a/languages/it.ini +++ b/languages/it.ini @@ -710,18 +710,7 @@ Range = "Intervallo" Range slider = "Scorri la serie" Read the full review online... = "Leggi tutta la recensione online..." Recall This = "Prenota" -recaptcha_audio_challenge = "Verifica audio" -recaptcha_cant_hear_this = "Scarica audio in MP3" -recaptcha_help_btn = "Guida" -recaptcha_image_alt_text = "Immagine di verifica reCAPTCHA" -recaptcha_incorrect_try_again = "Sbagliato. Riprova." -recaptcha_instructions_audio = "Digita ciò che senti:" -recaptcha_instructions_visual = "Digita il testo:" recaptcha_not_passed = "CAPTCHA non corretto" -recaptcha_play_again = "Riproduci di nuovo audio" -recaptcha_privacy_and_terms = "Privacy e Termini" -recaptcha_refresh_btn = "Nuova verifica" -recaptcha_visual_challenge = "Verifica visiva" Record Citations = "Citazioni del record" Record Count = "Conteggio dei record" Recover Account = "Recupera account" diff --git a/languages/ja.ini b/languages/ja.ini index c18ce6c3427..bfea27bf93e 100644 --- a/languages/ja.ini +++ b/languages/ja.ini @@ -711,18 +711,7 @@ Range = "検索範囲" Range slider = "レンジスライダ" Read the full review online... = "書評全文をオンラインã§é–²è¦§..." Recall This = "è¿”å´è«‹æ±‚ã™ã‚‹" -recaptcha_audio_challenge = "音声ã§ç¢ºèªã—ã¾ã™" -recaptcha_cant_hear_this = "MP3 ã§éŸ³å£°ã‚’ダウンãƒãƒ¼ãƒ‰" -recaptcha_help_btn = "ヘルプ" -recaptcha_image_alt_text = "reCAPTCHA 確èªç”¨ç”»åƒ" -recaptcha_incorrect_try_again = "æ£ã—ãã‚ã‚Šã¾ã›ã‚“。もã†ä¸€åº¦ã‚„ã‚Šç›´ã—ã¦ãã ã•ã„。" -recaptcha_instructions_audio = "èžã“ãˆãŸå˜èªžã‚’入力ã—ã¾ã™:" -recaptcha_instructions_visual = "テã‚ストを入力:" recaptcha_not_passed = "CAPTCHAãŒä¸€è‡´ã—ã¾ã›ã‚“" -recaptcha_play_again = "ã‚‚ã†ä¸€åº¦èžã" -recaptcha_privacy_and_terms = "プライãƒã‚·ãƒ¼ã¨åˆ©ç”¨è¦ç´„" -recaptcha_refresh_btn = "別ã®å˜èªžã§ã‚„ã‚Šç›´ã—ã¾ã™" -recaptcha_visual_challenge = "ç”»åƒã§ç¢ºèªã—ã¾ã™" Record Citations = "レコードã®å¼•ç”¨å½¢" Record Count = "レコード数" Recover Account = "アカウントã®å¾©æ—§" diff --git a/languages/nl.ini b/languages/nl.ini index 2ae02de8999..e27dbec9037 100644 --- a/languages/nl.ini +++ b/languages/nl.ini @@ -669,18 +669,7 @@ Range = "Periode" Range slider = "Reikwijdte schuifbalk" Read the full review online... = "Lees volledige bespreking online..." Recall This = "Hou dit vast" -recaptcha_audio_challenge = "Een audio-uitdaging proberen" -recaptcha_cant_hear_this = "Geluid downloaden als MP3" -recaptcha_help_btn = "Help" -recaptcha_image_alt_text = "reCAPTCHA-uitdagingsafbeelding" -recaptcha_incorrect_try_again = "Onjuist. Probeer het opnieuw." -recaptcha_instructions_audio = "Typ wat u hoort:" -recaptcha_instructions_visual = "Typ de tekst:" recaptcha_not_passed = "Onjuiste CAPTCHA" -recaptcha_play_again = "Geluid opnieuw afspelen" -recaptcha_privacy_and_terms = "Privacy en voorwaarden" -recaptcha_refresh_btn = "Een nieuwe uitdaging proberen" -recaptcha_visual_challenge = "Een visuele uitdaging proberen" Record Citations = "Record citatie" Refine Results = "Verfijn je resultaten" Region = "Gebied" diff --git a/languages/pl.ini b/languages/pl.ini index fb1e8e59d1e..30153d2ec22 100644 --- a/languages/pl.ini +++ b/languages/pl.ini @@ -772,18 +772,7 @@ Range = "Okres czasu" Range slider = "Slider" Read the full review online... = "Przeczytaj caÅ‚Ä… recenzjÄ™..." Recall This = "OdwoÅ‚aj" -recaptcha_audio_challenge = "Odtwórz podpowiedź dźwiÄ™kowÄ…" -recaptcha_cant_hear_this = "Pobierz dźwiÄ™k jako plik MP3" -recaptcha_help_btn = "Pomoc" -recaptcha_image_alt_text = "Zadanie obrazkowe reCAPTCHA" -recaptcha_incorrect_try_again = "NieprawidÅ‚owo. Spróbuj ponownie." -recaptcha_instructions_audio = "Wpisz usÅ‚yszane sÅ‚owa:" -recaptcha_instructions_visual = "Przepisz tekst:" recaptcha_not_passed = "CAPTCHA nie zweryfikowany" -recaptcha_play_again = "Odtwórz dźwiÄ™k ponownie" -recaptcha_privacy_and_terms = "Prywatność i warunki" -recaptcha_refresh_btn = "Nowa podpowiedź" -recaptcha_visual_challenge = "Pokaż podpowiedź wizualnÄ…" Record Citations = "Cytaty zapisu" Record Count = "Ilość zapisów" Recover Account = "Odzyskaj konto" diff --git a/languages/pt-br.ini b/languages/pt-br.ini index 5a17e055acf..9400f502210 100644 --- a/languages/pt-br.ini +++ b/languages/pt-br.ini @@ -711,18 +711,7 @@ Range = "Intervalo" Range slider = "Ajuste do Intervalo" Read the full review online... = "Leia a análise completa linha ..." Recall This = "Reservar" -recaptcha_audio_challenge = "Obter um desafio de áudio" -recaptcha_cant_hear_this = "Fazer download do som no formato MP3" -recaptcha_help_btn = "Ajuda" -recaptcha_image_alt_text = "Imagem de desafio reCAPTCHA" -recaptcha_incorrect_try_again = "Incorreto. Tente novamente." -recaptcha_instructions_audio = "Digite o que você ouve:" -recaptcha_instructions_visual = "Digite o texto:" recaptcha_not_passed = "Código CAPTCHA não coincidiu" -recaptcha_play_again = "Reproduzir som novamente" -recaptcha_privacy_and_terms = "Privacidade e Termos" -recaptcha_refresh_btn = "Obter um novo desafio" -recaptcha_visual_challenge = "Obter um desafio visual" Record Citations = "Citações do registro" Record Count = "Número de Registros" Recover Account = "Recuperar conta" diff --git a/languages/pt.ini b/languages/pt.ini index b05fc525011..cbee5ce7bf1 100644 --- a/languages/pt.ini +++ b/languages/pt.ini @@ -711,18 +711,7 @@ Range = "Intervalo" Range slider = "Ajuste do Intervalo" Read the full review online... = "Leia a análise completa linha ..." Recall This = "Reservar" -recaptcha_audio_challenge = "Obter um desafio de áudio" -recaptcha_cant_hear_this = "Fazer download do som no formato MP3" -recaptcha_help_btn = "Ajuda" -recaptcha_image_alt_text = "Imagem de desafio reCAPTCHA" -recaptcha_incorrect_try_again = "Incorreto. Tente novamente." -recaptcha_instructions_audio = "Digite o que você ouve:" -recaptcha_instructions_visual = "Digite o texto:" recaptcha_not_passed = "CAPTCHA errada" -recaptcha_play_again = "Reproduzir som novamente" -recaptcha_privacy_and_terms = "Privacidade e Termos" -recaptcha_refresh_btn = "Obter um novo desafio" -recaptcha_visual_challenge = "Obter um desafio visual" Record Citations = "Citações do registo" Record Count = "Número de Registos" Recover Account = "Recuperar Conta" diff --git a/languages/ru.ini b/languages/ru.ini index 68ed7136d73..f705a3f03af 100644 --- a/languages/ru.ini +++ b/languages/ru.ini @@ -727,18 +727,7 @@ Range = "Диапазон" Range slider = "Движок диапазонов" Read the full review online... = "Чтение полного обзора в режиме online..." Recall This = "Ðапомнить: " -recaptcha_audio_challenge = "Ð—Ð²ÑƒÐºÐ¾Ð²Ð°Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ°" -recaptcha_cant_hear_this = "Загрузить MP3-файл" -recaptcha_help_btn = "Справка" -recaptcha_image_alt_text = "Проверка по Ñлову reCAPTCHA" -recaptcha_incorrect_try_again = "Ðеправильно. Повторите попытку." -recaptcha_instructions_audio = "Введите то, что Ñлышите:" -recaptcha_instructions_visual = "Введите текÑÑ‚:" recaptcha_not_passed = "CAPTCHA не передана" -recaptcha_play_again = "ПроÑлушать еще раз" -recaptcha_privacy_and_terms = "Правила и принципы" -recaptcha_refresh_btn = "Обновить" -recaptcha_visual_challenge = "Ð’Ð¸Ð·ÑƒÐ°Ð»ÑŒÐ½Ð°Ñ Ð¿Ñ€Ð¾Ð²ÐµÑ€ÐºÐ°" Record Citations = "Цитаты запиÑи:" Record Count = "ЧиÑло запиÑей" Recover Account = "ВоÑÑтановить акаунт" diff --git a/languages/sl.ini b/languages/sl.ini index 7c42f7d122b..2ac47f8e024 100644 --- a/languages/sl.ini +++ b/languages/sl.ini @@ -605,17 +605,6 @@ Range = "Obseg" Range slider = "Obseg" Read the full review online... = "Poln pregled preberite online..." Recall This = "Rezervirajte" -recaptcha_audio_challenge = "ZvoÄni preskus" -recaptcha_cant_hear_this = "Prenesi zvok kot MP3" -recaptcha_help_btn = "PomoÄ" -recaptcha_image_alt_text = "Slika izziva reCAPTCHA" -recaptcha_incorrect_try_again = "NapaÄno. Poskusite znova." -recaptcha_instructions_audio = "Natipkajte, kaj sliÅ¡ite:" -recaptcha_instructions_visual = "Vnesite besedilo:" -recaptcha_play_again = "Znova predvajaj zvok" -recaptcha_privacy_and_terms = "Zasebnost in pogoji" -recaptcha_refresh_btn = "Nov preskus" -recaptcha_visual_challenge = "Vizualni preskus" Record Citations = "Citiranje zadetka" Record Count = "Å tetje zadetkov" Region = "Regija" diff --git a/languages/sv.ini b/languages/sv.ini index 51f42e61f1c..c36d1c91d7a 100644 --- a/languages/sv.ini +++ b/languages/sv.ini @@ -718,18 +718,7 @@ Range = "Tidsintervall" Range slider = "Reglage för tidssträckan" Read the full review online... = "Läs hela recensionen pÃ¥ webben..." Recall This = "Reservera denna" -recaptcha_audio_challenge = "Hämta captcha i ljudformat" -recaptcha_cant_hear_this = "Hämta ljud som MP3" -recaptcha_help_btn = "Hjälp" -recaptcha_image_alt_text = "reCAPTCHA-bild" -recaptcha_incorrect_try_again = "Fel. Försök igen." -recaptcha_instructions_audio = "Skriv det du hör:" -recaptcha_instructions_visual = "Skriv texten:" recaptcha_not_passed = "CAPTCHA inte klarat" -recaptcha_play_again = "Spela upp ljudet igen" -recaptcha_privacy_and_terms = "Sekretess och villkor" -recaptcha_refresh_btn = "Hämta ny captcha" -recaptcha_visual_challenge = "Hämta captcha i bildformat" Record Citations = "Hänvisningar gällande denna post" Record Count = "Antal poster" Recover Account = "Ã…tervinna kontot" diff --git a/languages/tr.ini b/languages/tr.ini index aa107d27c51..3c22a6835ae 100644 --- a/languages/tr.ini +++ b/languages/tr.ini @@ -721,18 +721,7 @@ Range = "Aralık" Range slider = "Sınırlandırma Düzeyi" Read the full review online... = "EleÅŸtirinin tamamını online oku..." Recall This = "Rezerve" -recaptcha_audio_challenge = "Sesli sorgu al" -recaptcha_cant_hear_this = "Sesi MP3 olarak indir" -recaptcha_help_btn = "Yardım" -recaptcha_image_alt_text = "reCAPTCHA sorusu resmi" -recaptcha_incorrect_try_again = "Yanlış. Tekrar deneyin." -recaptcha_instructions_audio = "DuyduÄŸunuzu yazın:" -recaptcha_instructions_visual = "Metni yazın:" recaptcha_not_passed = "CAPTCHA kodu uygun deÄŸil" -recaptcha_play_again = "Sesi tekrar çal" -recaptcha_privacy_and_terms = "Gizlilik ve Åžartlar" -recaptcha_refresh_btn = "Yeniden yükle" -recaptcha_visual_challenge = "Görsel sorgu al" Record Citations = "Alıntılar" Record Count = "Kayıt Sayısı" Recover Account = "Hesabı Kurtar" diff --git a/languages/zh-cn.ini b/languages/zh-cn.ini index 57150ecd50f..62dee64aadf 100644 --- a/languages/zh-cn.ini +++ b/languages/zh-cn.ini @@ -485,17 +485,6 @@ Range = "范围" Range slider = "范围滑æ†" Read the full review online... = "在线阅读全é¢è¯„论..." Recall This = "撤回" -recaptcha_audio_challenge = "æ¢ä¸€ç»„音频验è¯ç " -recaptcha_cant_hear_this = "以 MP3 æ ¼å¼ä¸‹è½½å£°éŸ³" -recaptcha_help_btn = "帮助" -recaptcha_image_alt_text = "reCAPTCHA 验è¯å›¾ç‰‡" -recaptcha_incorrect_try_again = "ä¸æ£ç¡®ï¼Œè¯·é‡è¯•ã€‚" -recaptcha_instructions_audio = "请键入您å¬åˆ°çš„内容:" -recaptcha_instructions_visual = "输入文å—:" -recaptcha_play_again = "é‡æ–°æ’放" -recaptcha_privacy_and_terms = "éšç§æƒå’Œä½¿ç”¨æ¡æ¬¾" -recaptcha_refresh_btn = "æ¢ä¸€ç»„验è¯ç " -recaptcha_visual_challenge = "收到一个视频邀请" Record Citations = "记录引文" Region = "地区" Related Author = "相关作者" diff --git a/languages/zh.ini b/languages/zh.ini index 1700ea2f747..493fae19c9e 100644 --- a/languages/zh.ini +++ b/languages/zh.ini @@ -485,17 +485,6 @@ Range = "範åœ" Range slider = "範åœæ»‘æ†" Read the full review online... = "在線閱讀全é¢è©•è«–..." Recall This = "撤回" -recaptcha_audio_challenge = "å–得語音驗è‰å•é¡Œ" -recaptcha_cant_hear_this = "å°‡è²éŸ³ä¸‹è¼‰ç‚º MP3" -recaptcha_help_btn = "說明" -recaptcha_image_alt_text = "reCAPTCHA é©—è‰æ–‡å—圖片" -recaptcha_incorrect_try_again = "ä¸æ£ç¢ºï¼Œå†è©¦ä¸€æ¬¡ã€‚" -recaptcha_instructions_audio = "éµå…¥æ‚¨æ‰€è½åˆ°çš„:" -recaptcha_instructions_visual = "輸入文å—:" -recaptcha_play_again = "å†æ¬¡æ’放è²éŸ³" -recaptcha_privacy_and_terms = "ç§éš±æ¬Šèˆ‡æ¢æ¬¾" -recaptcha_refresh_btn = "æ›ä¸€å€‹é©—è‰å•é¡Œ" -recaptcha_visual_challenge = "回ç”圖åƒé©—è‰å•é¡Œ" Record Citations = "記錄引文" Region = "地å€" Related Author = "相關作者" diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Recaptcha.php b/module/VuFind/src/VuFind/Controller/Plugin/Recaptcha.php index 6302c03f152..88d49b257a6 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/Recaptcha.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/Recaptcha.php @@ -117,28 +117,20 @@ class Recaptcha extends AbstractPlugin if (!$this->active()) { return true; } - $captchaPassed = false; - $recaptchaChallenge = $this->getController()->params() - ->fromPost('recaptcha_challenge_field'); - $recaptchaResponse = $this->getController()->params() - ->fromPost('recaptcha_response_field', 'manual_challenge'); - if (!empty($recaptchaChallenge)) { - try { - $result = $this->recaptcha->verify( - $recaptchaChallenge, - $recaptchaResponse - ); - } catch (\ZendService\ReCaptcha\Exception $e) { - $result = false; - } - $captchaPassed = $result && $result->isValid(); - if (!$captchaPassed) { - if ($this->errorMode == 'flash') { - $this->getController()->flashMessenger()->setNamespace('error') - ->addMessage('recaptcha_not_passed'); - } else { - throw new \Exception('recaptcha_not_passed'); - } + $responseField = $this->getController()->params() + ->fromPost('g-recaptcha-response'); + try { + $response = $this->recaptcha->verify($responseField); + } catch (\ZendService\ReCaptcha\Exception $e) { + $response = false; + } + $captchaPassed = $response && $response->isValid(); + if (!$captchaPassed) { + if ($this->errorMode == 'flash') { + $this->getController()->flashMessenger()->setNamespace('error') + ->addMessage('recaptcha_not_passed'); + } else { + throw new \Exception('recaptcha_not_passed'); } } return $captchaPassed; @@ -157,4 +149,4 @@ class Recaptcha extends AbstractPlugin && ($domain == false || $this->domains === true || in_array($domain, $this->domains)); } -} \ No newline at end of file +} diff --git a/module/VuFind/src/VuFind/Service/Factory.php b/module/VuFind/src/VuFind/Service/Factory.php index bcecfa33eee..8bc0d52b4c3 100644 --- a/module/VuFind/src/VuFind/Service/Factory.php +++ b/module/VuFind/src/VuFind/Service/Factory.php @@ -458,42 +458,25 @@ class Factory public static function getRecaptcha(ServiceManager $sm) { $config = $sm->get('VuFind\Config')->get('config'); - $recaptcha = new \ZendService\ReCaptcha\ReCaptcha( - isset($config->Captcha->publicKey) ? $config->Captcha->publicKey : '', - isset($config->Captcha->privateKey) ? $config->Captcha->privateKey : '' - ); + $siteKey = isset($config->Captcha->siteKey) + ? $config->Captcha->siteKey + : (isset($config->Captcha->publicKey) + ? $config->Captcha->publicKey + : ''); + $secretKey = isset($config->Captcha->secretKey) + ? $config->Captcha->secretKey + : (isset($config->Captcha->privateKey) + ? $config->Captcha->privateKey + : ''); + $recaptcha = new \LosReCaptcha\Service\ReCaptcha($siteKey, $secretKey); if (isset($config->Captcha->theme)) { $recaptcha->setOption('theme', $config->Captcha->theme); - $recaptcha->setOption('custom_theme_widget', 'custom_recaptcha_widget'); - $translator = $sm->get('VuFind\Translator'); - $recaptcha->setOption( - 'custom_translations', - [ - 'audio_challenge' => - $translator->translate('recaptcha_audio_challenge'), - 'cant_hear_this' => - $translator->translate('recaptcha_cant_hear_this'), - 'help_btn' => - $translator->translate('recaptcha_help_btn'), - 'image_alt_text' => - $translator->translate('recaptcha_image_alt_text'), - 'incorrect_try_again' => - $translator->translate('recaptcha_incorrect_try_again'), - 'instructions_audio' => - $translator->translate('recaptcha_instructions_audio'), - 'instructions_visual' => - $translator->translate('recaptcha_instructions_visual'), - 'play_again' => - $translator->translate('recaptcha_play_again'), - 'privacy_and_terms' => - $translator->translate('recaptcha_privacy_and_terms'), - 'refresh_btn' => - $translator->translate('recaptcha_refresh_btn'), - 'visual_challenge' => - $translator->translate('recaptcha_visual_challenge') - ] - ); } + $translator = $sm->get('VuFind\Translator'); + $recaptcha->setOption('lang', $translator->getLocale()); + + $httpClient = $sm->get('VuFind\Http')->createClient(); + $recaptcha->setHttpClient($httpClient); return $recaptcha; } diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php b/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php index be8789486f3..7d324e90a14 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Recaptcha.php @@ -87,49 +87,7 @@ class Recaptcha extends AbstractHelper if (!isset($useRecaptcha) || !$useRecaptcha) { return false; } - - if ($this->recaptcha->getPublicKey() === null) { - throw new Exception('Missing public key'); - } - - $host = \ZendService\Recaptcha\Recaptcha::API_SERVER; - - $params = $this->recaptcha->getParams(); - if ((bool) $params['ssl'] === true) { - $host = \ZendService\Recaptcha\Recaptcha::API_SECURE_SERVER; - } - - $errorPart = ''; - if (!empty($params['error'])) { - $errorPart = '&error=' . urlencode($params['error']); - } - - $options = $this->recaptcha->getOptions(); - if (!empty($options)) { - $encoded = \Zend\Json\Json::encode($options); - } else { - $encoded = "{}"; - } - $challengeField = 'recaptcha_challenge_field'; - $responseField = 'recaptcha_response_field'; - if (!empty($name)) { - $challengeField = $name . '[' . $challengeField . ']'; - $responseField = $name . '[' . $responseField . ']'; - } - - return $this->view->render( - 'Service/recaptcha.phtml', - [ - 'challengeField' => $challengeField, - 'errorPart' => $errorPart, - 'host' => $host, - 'options' => $encoded, - 'publicKey' => $this->recaptcha->getPublicKey(), - 'responseField' => $responseField, - 'theme' => $options['theme'], - 'useRecaptcha' => $useRecaptcha, - ] - ); + return $this->recaptcha->getHtml(); } /** diff --git a/themes/bootstrap3/templates/Auth/Database/recovery.phtml b/themes/bootstrap3/templates/Auth/Database/recovery.phtml index 8d7ffb78fcf..c164f063883 100644 --- a/themes/bootstrap3/templates/Auth/Database/recovery.phtml +++ b/themes/bootstrap3/templates/Auth/Database/recovery.phtml @@ -10,7 +10,11 @@ <input type="email" name="email" class="form-control"/> </div> </div> -<?=$this->recaptcha()->html($this->useRecaptcha) ?> +<div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <?=$this->recaptcha()->html($this->useRecaptcha) ?> + </div> +</div> <div class="form-group"> <div class="col-sm-9 col-sm-offset-3"> <input class="btn btn-default" name="submit" type="submit" value="<?=$this->transEsc('Recover Account') ?>"/> diff --git a/themes/bootstrap3/templates/Helpers/email-form-fields.phtml b/themes/bootstrap3/templates/Helpers/email-form-fields.phtml index 8a982c42399..27e6c5bde2e 100644 --- a/themes/bootstrap3/templates/Helpers/email-form-fields.phtml +++ b/themes/bootstrap3/templates/Helpers/email-form-fields.phtml @@ -44,7 +44,11 @@ </div> </div> <? endif ?> -<?=$this->recaptcha()->html($this->useRecaptcha) ?> +<div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <?=$this->recaptcha()->html($this->useRecaptcha) ?> + </div> +</div> <div class="form-group"> <div class="col-sm-9 col-sm-offset-3"> <input type="submit" class="btn btn-primary" name="submit" value="<?=$this->transEsc('Send')?>"/> diff --git a/themes/bootstrap3/templates/Service/recaptcha.phtml b/themes/bootstrap3/templates/Service/recaptcha.phtml deleted file mode 100644 index 1293d741fca..00000000000 --- a/themes/bootstrap3/templates/Service/recaptcha.phtml +++ /dev/null @@ -1,38 +0,0 @@ -<? if(isset($this->useRecaptcha) && $this->useRecaptcha): ?> - <?=$this->inlineScript(\Zend\View\Helper\HeadScript::FILE, 'vendor/recaptcha_ajax.js', 'SET') ?> - <div class="form-group"> - <div class="col-sm-9 col-sm-offset-3"> - <?=$this->reCaptchaOptions ?> - - <div id="recaptcha_widget" style="display:none"> - <? if ($this->theme == 'custom'): ?> - <div id="custom_recaptcha_widget"> - <div id="recaptcha_image"></div> - <div class="recaptcha_only_if_incorrect_sol" class="text-danger"><?=$this->translate('recaptcha_incorrect_try_again') ?></div> - - <span class="recaptcha_only_if_image"><?=$this->translate('recaptcha_instructions_visual') ?></span> - <span class="recaptcha_only_if_audio"><?=$this->translate('recaptcha_instructions_audio') ?></span> - - <input type="text" id="<?=$this->responseField ?>" name="<?=$this->responseField ?>" /> - - <div><a href="javascript:Recaptcha.reload()"><?=$this->translate('recaptcha_refresh_btn') ?></a></div> - <div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')"><?=$this->translate('recaptcha_audio_challenge') ?></a></div> - <div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')"><?=$this->translate('recaptcha_visual_challenge') ?></a></div> - - <div><a href="javascript:Recaptcha.showhelp()"><?=$this->translate('recaptcha_help_btn') ?></a></div> - </div> - <? endif; ?> - </div> - - <noscript> - <iframe src="<?=$this->host ?>/noscript?k=<?=$this->publicKey ?><?=$this->errorPart ?>" height="300" width="500" frameborder="0"></iframe> - <textarea name="<?=$this->challengeField ?>" rows="3" cols="40"></textarea> - <input type="hidden" name="<?=$this->responseField ?>" value="manual_challenge"/> - </noscript> - - <script type="text/javascript"> - Recaptcha.create("<?=$this->publicKey ?>", 'recaptcha_widget', <?=$this->options ?>); - </script> - </div> - </div> -<? endif; ?> \ No newline at end of file diff --git a/themes/bootstrap3/templates/myresearch/newpassword.phtml b/themes/bootstrap3/templates/myresearch/newpassword.phtml index d504382bf7d..20a9e0f05e9 100644 --- a/themes/bootstrap3/templates/myresearch/newpassword.phtml +++ b/themes/bootstrap3/templates/myresearch/newpassword.phtml @@ -24,7 +24,11 @@ <input type="hidden" value="<?=$this->escapeHtmlAttr($this->username) ?>" name="username"/> <input type="hidden" value="<?=$this->escapeHtmlAttr($this->auth_method) ?>" name="auth_method"/> <?=$this->auth()->getNewPasswordForm() ?> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> + <div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <?=$this->recaptcha()->html($this->useRecaptcha) ?> + </div> + </div> <div class="form-group"> <div class="col-sm-9 col-sm-offset-3"> <input class="btn btn-primary" name="submit" type="submit" value="<?=$this->transEsc('Submit')?>" /> diff --git a/themes/bootstrap3/templates/record/sms.phtml b/themes/bootstrap3/templates/record/sms.phtml index 7166920d135..886b27115a2 100644 --- a/themes/bootstrap3/templates/record/sms.phtml +++ b/themes/bootstrap3/templates/record/sms.phtml @@ -35,7 +35,11 @@ <? $keys = is_array($this->carriers) ? array_keys($this->carriers) : array(); ?> <input type="hidden" name="provider" value="<?=isset($keys[0]) ? $keys[0] : ''?>" /> <? endif; ?> - <?=$this->recaptcha()->html($this->useRecaptcha) ?> + <div class="form-group"> + <div class="col-sm-9 col-sm-offset-3"> + <?=$this->recaptcha()->html($this->useRecaptcha) ?> + </div> + </div> <div class="form-group"> <div class="col-sm-9 col-sm-offset-3"> <input class="btn btn-primary" type="submit" name="submit" value="<?=$this->transEsc('Send Text')?>"<? if(isset($this->validation) && !empty($this->validation)):?> onClick="return phoneNumberFormHandler('sms_to', '<?=$this->validation ?>')"<? endif; ?>/> diff --git a/themes/root/templates/Service/recaptcha.phtml b/themes/root/templates/Service/recaptcha.phtml deleted file mode 100644 index a8ec0242919..00000000000 --- a/themes/root/templates/Service/recaptcha.phtml +++ /dev/null @@ -1,35 +0,0 @@ -<? if(isset($this->useRecaptcha) && $this->useRecaptcha): ?> - - <?=$this->reCaptchaOptions ?> - - <div id="recaptcha_widget" style="display:none"> - <? if ($this->theme == 'custom'): ?> - <div id="custom_recaptcha_widget"> - <div id="recaptcha_image"></div> - <div class="recaptcha_only_if_incorrect_sol" class="text-error"><?=$this->translate('recaptcha_incorrect_try_again') ?></div> - - <span class="recaptcha_only_if_image"><?=$this->translate('recaptcha_instructions_visual') ?></span> - <span class="recaptcha_only_if_audio"><?=$this->translate('recaptcha_instructions_audio') ?></span> - - <input type="text" id="<?=$this->responseField ?>" name="<?=$this->responseField ?>" /> - - <div><a href="javascript:Recaptcha.reload()"><?=$this->translate('recaptcha_refresh_btn') ?></a></div> - <div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')"><?=$this->translate('recaptcha_audio_challenge') ?></a></div> - <div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')"><?=$this->translate('recaptcha_visual_challenge') ?></a></div> - - <div><a href="javascript:Recaptcha.showhelp()"><?=$this->translate('recaptcha_help_btn') ?></a></div> - </div> - <? endif; ?> - </div> - - <noscript> - <iframe src="<?=$this->host ?>/noscript?k=<?=$this->publicKey ?><?=$this->errorPart ?>" height="300" width="500" frameborder="0"></iframe> - <textarea name="<?=$this->challengeField ?>" rows="3" cols="40"></textarea> - <input type="hidden" name="<?=$this->responseField ?>" value="manual_challenge"/> - </noscript> - - <script type="text/javascript"> - Recaptcha.create("<?=$this->publicKey ?>", 'recaptcha_widget', <?=$this->options ?>); - </script> - -<? endif; ?> \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index 05f28f65e87..2ab8de0d4d4 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50::getLoader(); +return ComposerAutoloaderInit43b46e74f0afcd66689b3c67cdb801ef::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 978e3e49863..065890bfa1d 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -63,6 +63,12 @@ return array( 'File_MARC_List' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/List.php', 'File_MARC_Record' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Record.php', 'File_MARC_Subfield' => $vendorDir . '/pear-pear.php.net/File_MARC/File/MARC/Subfield.php', + 'LosReCaptcha\\Captcha\\ReCaptcha' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Captcha/ReCaptcha.php', + 'LosReCaptcha\\Form\\View\\Helper\\Captcha\\ReCaptcha' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php', + 'LosReCaptcha\\Module' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Module.php', + 'LosReCaptcha\\Service\\Exception' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Service/Exception.php', + 'LosReCaptcha\\Service\\ReCaptcha' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Service/ReCaptcha.php', + 'LosReCaptcha\\Service\\Response' => $vendorDir . '/los/losrecaptcha/src/LosReCaptcha/Service/Response.php', 'OS_Guess' => $vendorDir . '/pear-pear.php.net/PEAR/OS/Guess.php', 'PEAR' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR.php', 'PEAR5' => $vendorDir . '/pear-pear.php.net/PEAR/PEAR5.php', diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index b7ba447e90c..a168aef26e1 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -10,7 +10,6 @@ return array( 'Zend\\' => array($vendorDir . '/zendframework/zendframework/library'), 'ZendXml' => array($vendorDir . '/zendframework/zendxml/library'), 'ZendService\\Amazon\\' => array($vendorDir . '/zendframework/zendservice-amazon/library'), - 'ZendService' => array($vendorDir . '/zendframework/zendservice-recaptcha/library'), 'ZendRest' => array($vendorDir . '/zendframework/zendrest/library'), 'VuFindHttp\\' => array($vendorDir . '/vufind-org/vufindhttp/src'), 'VuFindCode\\' => array($vendorDir . '/vufind-org/vufindcode/src'), @@ -21,6 +20,7 @@ return array( 'Rbac\\' => array($vendorDir . '/zfr/rbac/src'), 'ProxyManager\\' => array($vendorDir . '/ocramius/proxy-manager/src'), 'PHPQRCode' => array($vendorDir . '/aferrandini/phpqrcode/lib'), + 'LosReCaptcha\\' => array($vendorDir . '/los/losrecaptcha/src'), 'Less' => array($vendorDir . '/oyejorge/less.php/lib'), 'Behat\\Mink\\Driver' => array($vendorDir . '/behat/mink-zombie-driver/src'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 21c71158886..de750cd1d12 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -6,5 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( + 'LosReCaptcha\\' => array($vendorDir . '/los/losrecaptcha/src'), 'Behat\\Mink\\' => array($vendorDir . '/behat/mink/src'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index c13b459e241..b53d4eb3e86 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50 +class ComposerAutoloaderInit43b46e74f0afcd66689b3c67cdb801ef { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit43b46e74f0afcd66689b3c67cdb801ef', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit43b46e74f0afcd66689b3c67cdb801ef', 'loadClassLoader')); $includePaths = require __DIR__ . '/include_paths.php'; array_push($includePaths, get_include_path()); @@ -48,7 +48,7 @@ class ComposerAutoloaderInit92f7acc9a48874264e5f443ba6590f50 } } -function composerRequire92f7acc9a48874264e5f443ba6590f50($file) +function composerRequire43b46e74f0afcd66689b3c67cdb801ef($file) { require $file; } diff --git a/vendor/composer/include_paths.php b/vendor/composer/include_paths.php index 9edf5c46a7f..20869ac55f9 100644 --- a/vendor/composer/include_paths.php +++ b/vendor/composer/include_paths.php @@ -7,11 +7,11 @@ $baseDir = dirname($vendorDir); return array( $vendorDir . '/pear-pear.php.net/File_MARC', - $vendorDir . '/pear-pear.php.net/PEAR', - $vendorDir . '/pear-pear.php.net/Validate', - $vendorDir . '/pear-pear.php.net/Validate_ISPN', + $vendorDir . '/pear-pear.php.net/XML_Util', $vendorDir . '/pear-pear.php.net/Console_Getopt', $vendorDir . '/pear-pear.php.net/Structures_Graph', - $vendorDir . '/pear-pear.php.net/XML_Util', $vendorDir . '/pear-pear.php.net/Archive_Tar', + $vendorDir . '/pear-pear.php.net/PEAR', + $vendorDir . '/pear-pear.php.net/Validate', + $vendorDir . '/pear-pear.php.net/Validate_ISPN', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0499853ad6a..6f4004a206b 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -172,127 +172,229 @@ "description": "Library for interacting with Serials Solutions' Summon API." }, { - "name": "pear-pear.php.net/File_MARC", - "version": "1.1.1", - "version_normalized": "1.1.1.0", + "name": "symfony/process", + "version": "v2.6.7", + "version_normalized": "2.6.7.0", + "target-dir": "Symfony/Component/Process", + "source": { + "type": "git", + "url": "https://github.com/symfony/Process.git", + "reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562" + }, "dist": { - "type": "file", - "url": "http://pear.php.net/get/File_MARC-1.1.1.tgz", - "reference": null, - "shasum": null + "type": "zip", + "url": "https://api.github.com/repos/symfony/Process/zipball/9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", + "reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", + "shasum": "" }, "require": { - "php": ">=5.3.0.0" + "php": ">=5.3.3" }, - "replace": { - "pear-pear/file_marc": "== 1.1.1.0" + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "time": "2015-05-02 15:18:45", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } }, - "type": "pear-library", "installation-source": "dist", "autoload": { - "classmap": [ - "" - ] + "psr-0": { + "Symfony\\Component\\Process\\": "" + } }, - "include-path": [ - "/" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called \"php-marc\", that is part of the Emilda Project (http://www.emilda.org). Christoffer Landtman generously agreed to make the \"php-marc\" code available under the GNU LGPL so it could be used as the basis of this PEAR package." + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com" }, { - "name": "pear-pear.php.net/PEAR", - "version": "1.9.5", - "version_normalized": "1.9.5.0", + "name": "symfony/css-selector", + "version": "v2.6.7", + "version_normalized": "2.6.7.0", + "target-dir": "Symfony/Component/CssSelector", + "source": { + "type": "git", + "url": "https://github.com/symfony/CssSelector.git", + "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d" + }, "dist": { - "type": "file", - "url": "http://pear.php.net/get/PEAR-1.9.5.tgz", - "reference": null, - "shasum": null + "type": "zip", + "url": "https://api.github.com/repos/symfony/CssSelector/zipball/189cf0f7f56d7c4be3b778df15a7f16a29f3680d", + "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d", + "shasum": "" }, "require": { - "ext-pcre": "*", - "ext-xml": "*", - "pear-pear.php.net/archive_tar": ">=1.3.11.0", - "pear-pear.php.net/console_getopt": ">=1.2.0.0", - "pear-pear.php.net/structures_graph": ">=1.0.2.0", - "pear-pear.php.net/xml_util": ">=1.2.0.0", - "php": ">=4.4.0.0,!=5.0.0.0,!=5.1.0.0,!=5.1.1.0,!=5.1.2.0,!=5.1.3.0,!=5.1.4.0,!=5.1.5.0" + "php": ">=5.3.3" }, - "conflict": { - "pear-pear.php.net/pear_frontend_gtk": "<0.4.0.0", - "pear-pear.php.net/pear_frontend_web": "<=0.4.0.0" + "require-dev": { + "symfony/phpunit-bridge": "~2.7" }, - "replace": { - "pear-pear/pear": "== 1.9.5.0" + "time": "2015-05-02 15:18:45", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } }, - "type": "pear-library", "installation-source": "dist", "autoload": { - "classmap": [ - "" - ] + "psr-0": { + "Symfony\\Component\\CssSelector\\": "" + } }, - "include-path": [ - "/" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks" + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com" }, { - "name": "pear-pear.php.net/Validate", - "version": "0.8.5", - "version_normalized": "0.8.5.0", + "name": "behat/mink", + "version": "v1.6.1", + "version_normalized": "1.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/minkphp/Mink.git", + "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a" + }, "dist": { - "type": "file", - "url": "http://pear.php.net/get/Validate-0.8.5.tgz", - "reference": null, - "shasum": null + "type": "zip", + "url": "https://api.github.com/repos/minkphp/Mink/zipball/8b68523a339ec991bcd638b39dc8f04f808da88a", + "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a", + "shasum": "" }, "require": { - "php": ">=4.2.0.0" + "php": ">=5.3.1", + "symfony/css-selector": "~2.0" }, - "replace": { - "pear-pear/validate": "== 0.8.5.0" + "suggest": { + "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", + "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", + "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", + "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)" + }, + "time": "2015-02-04 17:02:06", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } }, - "type": "pear-library", "installation-source": "dist", "autoload": { - "classmap": [ - "" - ] + "psr-4": { + "Behat\\Mink\\": "src/" + } }, - "include-path": [ - "/" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "Package to validate various datas. It includes :\n - numbers (min/max, decimal or not)\n - email (syntax, domain check, rfc822)\n - string (predifined type alpha upper and/or lowercase, numeric,...)\n - date (min, max, rfc822 compliant)\n - uri (RFC2396)\n - possibility valid multiple data with a single method call (::multiple)" + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Browser controller/emulator abstraction for PHP", + "homepage": "http://mink.behat.org/", + "keywords": [ + "browser", + "testing", + "web" + ] }, { - "name": "pear-pear.php.net/Validate_ISPN", - "version": "0.6.1", - "version_normalized": "0.6.1.0", + "name": "behat/mink-zombie-driver", + "version": "v1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/minkphp/MinkZombieDriver.git", + "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1" + }, "dist": { - "type": "file", - "url": "http://pear.php.net/get/Validate_ISPN-0.6.1.tgz", - "reference": null, - "shasum": null + "type": "zip", + "url": "https://api.github.com/repos/minkphp/MinkZombieDriver/zipball/cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", + "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", + "shasum": "" }, "require": { - "pear-pear.php.net/validate": ">=0.5.0.0", - "php": ">=4.1.0.0" + "behat/mink": "~1.6@dev", + "php": ">=5.3.1", + "symfony/process": "~2.1" }, - "replace": { - "pear-pear/validate_ispn": "== 0.6.1.0" + "time": "2014-09-26 12:26:25", + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } }, - "type": "pear-library", "installation-source": "dist", "autoload": { - "classmap": [ - "" - ] + "psr-0": { + "Behat\\Mink\\Driver": "src/" + } }, - "include-path": [ - "/" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "description": "Package containes ISPN (International Standard Product Numbers) validations such as:\n * ISSN\n * ISBN\n * ISMN\n * ISRC (International Standard Recording Code)\n * EAN8\n * EAN13\n * EAN14\n * UCC12\n * SSCC" + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Pascal Cremer", + "email": "b00gizm@gmail.com", + "homepage": "http://github.com/b00gizm" + } + ], + "description": "Zombie.js driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "ajax", + "browser", + "headless", + "javascript", + "testing", + "zombie" + ] }, { "name": "zendframework/zendxml", @@ -306,7 +408,7 @@ "dist": { "type": "zip", "url": "https://packages.zendframework.com/composer/zendframework-zendxml-559b34f426d33a11c3db118e00ce14bb8dc64e5f-zip-6cf7a2.zip", - "reference": "1.0.0", + "reference": "559b34f426d33a11c3db118e00ce14bb8dc64e5f", "shasum": "39abc614b5c26bcbf8102e203c52dee73c4460a8" }, "require": { @@ -345,130 +447,227 @@ } }, { - "name": "zendframework/zendrest", - "version": "2.0.2", - "version_normalized": "2.0.2.0", + "name": "zendframework/zendframework", + "version": "2.3.7", + "version_normalized": "2.3.7.0", "source": { "type": "git", - "url": "https://github.com/zendframework/ZendRest.git", - "reference": "7427d242b4546e5aef1206d2c97e402109d8843e" + "url": "https://github.com/zendframework/zf2.git", + "reference": "a1aae5fdd27a422beb32c56ddf5a197654a0f94a" }, "dist": { "type": "zip", - "url": "https://packages.zendframework.com/composer/zendframework-zendrest-7427d242b4546e5aef1206d2c97e402109d8843e-zip-da96cc.zip", - "reference": "2.0.2", - "shasum": "cd304d9e2fccccbd98348bfbead7d42b102e565a" + "url": "https://packages.zendframework.com/composer/zendframework-zendframework-a1aae5fdd27a422beb32c56ddf5a197654a0f94a-zip-06d4c7.zip", + "reference": "a1aae5fdd27a422beb32c56ddf5a197654a0f94a", + "shasum": "7033dd58d94b0c75fae8a00001f8a7275c218209" }, "require": { - "php": ">=5.3.3", - "zendframework/zend-http": "~2.0", - "zendframework/zend-uri": "~2.0", + "php": ">=5.3.23", "zendframework/zendxml": "~1.0-dev" }, - "time": "2014-03-05 22:32:09", + "replace": { + "zendframework/zend-authentication": "self.version", + "zendframework/zend-barcode": "self.version", + "zendframework/zend-cache": "self.version", + "zendframework/zend-captcha": "self.version", + "zendframework/zend-code": "self.version", + "zendframework/zend-config": "self.version", + "zendframework/zend-console": "self.version", + "zendframework/zend-crypt": "self.version", + "zendframework/zend-db": "self.version", + "zendframework/zend-debug": "self.version", + "zendframework/zend-di": "self.version", + "zendframework/zend-dom": "self.version", + "zendframework/zend-escaper": "self.version", + "zendframework/zend-eventmanager": "self.version", + "zendframework/zend-feed": "self.version", + "zendframework/zend-file": "self.version", + "zendframework/zend-filter": "self.version", + "zendframework/zend-form": "self.version", + "zendframework/zend-http": "self.version", + "zendframework/zend-i18n": "self.version", + "zendframework/zend-inputfilter": "self.version", + "zendframework/zend-json": "self.version", + "zendframework/zend-ldap": "self.version", + "zendframework/zend-loader": "self.version", + "zendframework/zend-log": "self.version", + "zendframework/zend-mail": "self.version", + "zendframework/zend-math": "self.version", + "zendframework/zend-memory": "self.version", + "zendframework/zend-mime": "self.version", + "zendframework/zend-modulemanager": "self.version", + "zendframework/zend-mvc": "self.version", + "zendframework/zend-navigation": "self.version", + "zendframework/zend-paginator": "self.version", + "zendframework/zend-permissions-acl": "self.version", + "zendframework/zend-permissions-rbac": "self.version", + "zendframework/zend-progressbar": "self.version", + "zendframework/zend-resources": "self.version", + "zendframework/zend-serializer": "self.version", + "zendframework/zend-server": "self.version", + "zendframework/zend-servicemanager": "self.version", + "zendframework/zend-session": "self.version", + "zendframework/zend-soap": "self.version", + "zendframework/zend-stdlib": "self.version", + "zendframework/zend-tag": "self.version", + "zendframework/zend-test": "self.version", + "zendframework/zend-text": "self.version", + "zendframework/zend-uri": "self.version", + "zendframework/zend-validator": "self.version", + "zendframework/zend-version": "self.version", + "zendframework/zend-view": "self.version", + "zendframework/zend-xmlrpc": "self.version" + }, + "require-dev": { + "doctrine/annotations": ">=1.0", + "fabpot/php-cs-fixer": "1.*", + "ircmaxell/random-lib": "dev-master", + "ircmaxell/security-lib": "dev-master", + "mikey179/vfsstream": "1.2.*", + "phpunit/phpunit": "3.7.*", + "satooshi/php-coveralls": "dev-master", + "sebastianbergmann/phpcov": "1.1.0" + }, + "suggest": { + "doctrine/annotations": "Doctrine Annotations >=1.0 for annotation features", + "ext-intl": "ext/intl for i18n features (included in default builds of PHP)", + "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", + "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", + "zendframework/zendpdf": "ZendPdf for creating PDF representations of barcodes", + "zendframework/zendservice-recaptcha": "ZendService\\ReCaptcha for rendering ReCaptchas in Zend\\Captcha and/or Zend\\Form" + }, + "time": "2015-03-12 16:55:53", + "bin": [ + "bin/classmap_generator.php", + "bin/pluginmap_generator.php", + "bin/templatemap_generator.php" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3-dev", + "dev-develop": "2.4-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { - "ZendRest": "library/" + "Zend\\": "library/" + } + }, + "autoload-dev": { + "psr-0": { + "ZendTest\\": "tests/" } }, "license": [ "BSD-3-Clause" ], - "description": " ", - "homepage": "http://packages.zendframework.com/", + "description": "Zend Framework 2", + "homepage": "http://framework.zend.com/", "keywords": [ - "rest", + "framework", "zf2" ], "support": { - "source": "https://github.com/zendframework/ZendRest/tree/release-2.0.2", - "issues": "https://github.com/zendframework/ZendRest/issues" + "source": "https://github.com/zendframework/zf2/tree/release-2.3.7", + "issues": "https://github.com/zendframework/zf2/issues" } }, { - "name": "zendframework/zendservice-amazon", - "version": "2.0.3", - "version_normalized": "2.0.3.0", + "name": "los/losrecaptcha", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/ZendService_Amazon.git", - "reference": "f3d44e3488908323c34bf040c045ee71e1196796" + "url": "https://github.com/Lansoweb/LosReCaptcha.git", + "reference": "2e18af8d57286c28c1951c7305f8379e7304b203" }, "dist": { "type": "zip", - "url": "https://packages.zendframework.com/composer/zendframework-zendservice-amazon-f3d44e3488908323c34bf040c045ee71e1196796-zip-31bbc0.zip", - "reference": "2.0.3", - "shasum": "b7f77cced220f6738248fc827952ab2c6604a08f" + "url": "https://api.github.com/repos/Lansoweb/LosReCaptcha/zipball/2e18af8d57286c28c1951c7305f8379e7304b203", + "reference": "2e18af8d57286c28c1951c7305f8379e7304b203", + "shasum": "" }, "require": { - "php": ">=5.3.3", - "zendframework/zend-crypt": "~2.0", - "zendframework/zend-http": "~2.0", - "zendframework/zend-json": "~2.0", - "zendframework/zendrest": "~2.0", - "zendframework/zendxml": "~1.0-dev" + "php": ">=5.4.0", + "zendframework/zendframework": ">=2.3.2,<3.0.0" }, "require-dev": { - "zendframework/zend-i18n": "~2.0" + "satooshi/php-coveralls": "dev-master" }, "suggest": { - "zendframework/zend-uri": "Zend\\Uri component" + "los/losbase": "los/losbase for some abstract classes to speed development ", + "los/loslog": "los/loslog for logging", + "los/losui": "los/losui for twitter bootstrap 3 styling, jquery, chosen and other libraries" }, - "time": "2014-03-05 22:37:42", + "time": "2015-04-28 15:40:23", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "installation-source": "dist", "autoload": { + "psr-4": { + "LosReCaptcha\\": "src/" + }, "psr-0": { - "ZendService\\Amazon\\": "library/" - } + "LosReCaptcha\\": "src/" + }, + "classmap": [ + "./" + ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "OOP wrapper for the Amazon web service", - "homepage": "http://packages.zendframework.com/", + "authors": [ + { + "name": "Leandro Silva", + "email": "leandro@leandrosilva.info", + "homepage": "http://leandrosilva.info" + } + ], + "description": "ZF2 module for integration with new ReCaptcha service form Google", + "homepage": "http://github.com/Lansoweb/LosReCaptcha", "keywords": [ - "amazon", - "ec2", - "s3", - "simpledb", - "sqs", + "captcha", + "los", + "module", + "recaptcha", "zf2" - ], - "support": { - "source": "https://github.com/zendframework/ZendService_Amazon/tree/master", - "issues": "https://github.com/zendframework/ZendService_Amazon/issues" - } + ] }, { - "name": "zendframework/zendservice-recaptcha", - "version": "2.0.1", - "version_normalized": "2.0.1.0", + "name": "ocramius/proxy-manager", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/zendframework/ZendService_ReCaptcha.git", - "reference": "4324cca8502d9f47b3b43a18acdd3fdbeb965536" + "url": "https://github.com/Ocramius/ProxyManager.git", + "reference": "a80a39fac4fbd771aea7d3871929933a3a1bbf3e" }, "dist": { "type": "zip", - "url": "https://packages.zendframework.com/composer/zendframework-zendservice-recaptcha-4324cca8502d9f47b3b43a18acdd3fdbeb965536-zip-8c45bf.zip", - "reference": "2.0.1", - "shasum": "fab92465cda889ff975c1ec79bb378d7e3f39081" + "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/a80a39fac4fbd771aea7d3871929933a3a1bbf3e", + "reference": "a80a39fac4fbd771aea7d3871929933a3a1bbf3e", + "shasum": "" }, "require": { "php": ">=5.3.3", - "zendframework/zend-http": ">=2.0.0", - "zendframework/zend-uri": ">=2.0.0", - "zendframework/zend-version": ">=2.0.0" + "zendframework/zend-code": ">2.2.5,<3.0" + }, + "require-dev": { + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "1.5.*" + }, + "suggest": { + "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects", + "zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)", + "zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)", + "zendframework/zend-stdlib": "To use the hydrator proxy", + "zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)" }, - "time": "2012-09-24 15:18:29", + "time": "2014-12-12 10:59:05", "type": "library", "extra": { "branch-alias": { @@ -478,358 +677,272 @@ "installation-source": "dist", "autoload": { "psr-0": { - "ZendService": "library/" + "ProxyManager\\": "src" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], - "description": "OOP wrapper for the ReCaptcha web service", - "homepage": "http://packages.zendframework.com/", - "keywords": [ - "recaptcha", - "zf2" + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } ], - "support": { - "source": "https://github.com/zendframework/ZendService_ReCaptcha/tree/release-2.0.1", - "issues": "https://github.com/zendframework/ZendService_ReCaptcha/issues" - } + "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies", + "homepage": "https://github.com/Ocramius/ProxyManager", + "keywords": [ + "aop", + "lazy loading", + "proxy", + "proxy pattern", + "service proxies" + ] }, { - "name": "vufind-org/vufindcode", - "version": "v1.0.2", - "version_normalized": "1.0.2.0", + "name": "oyejorge/less.php", + "version": "v1.7.0.3", + "version_normalized": "1.7.0.3", "source": { "type": "git", - "url": "https://github.com/vufind-org/vufindcode.git", - "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0" + "url": "https://github.com/oyejorge/less.php.git", + "reference": "6e08ecb07e6f6d9170c23e8744c58fdd822ad0de" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vufind-org/vufindcode/zipball/1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0", - "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0", + "url": "https://api.github.com/repos/oyejorge/less.php/zipball/6e08ecb07e6f6d9170c23e8744c58fdd822ad0de", + "reference": "6e08ecb07e6f6d9170c23e8744c58fdd822ad0de", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.2" }, - "time": "2014-09-17 15:48:11", + "time": "2015-03-10 18:12:59", + "bin": [ + "bin/lessc" + ], "type": "library", "installation-source": "dist", "autoload": { "psr-0": { - "VuFindCode\\": "src/" - } + "Less": "lib/" + }, + "classmap": [ + "lessc.inc.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPL-2.0" + "Apache-2.0" ], "authors": [ { - "name": "Demian Katz", - "email": "demian.katz@villanova.edu" - } - ], - "description": "Class for representing ISBNs (a VuFind support library)" - }, - { - "name": "behat/mink-zombie-driver", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/Behat/MinkZombieDriver.git", - "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1" - }, + "name": "Matt Agar", + "homepage": "https://github.com/agar" + }, + { + "name": "Martin JantoÅ¡oviÄ", + "homepage": "https://github.com/Mordred" + }, + { + "name": "Josh Schmidt", + "homepage": "https://github.com/oyejorge" + } + ], + "description": "PHP port of the Javascript version of LESS http://lesscss.org", + "homepage": "http://lessphp.gpeasy.com", + "keywords": [ + "css", + "less", + "less.js", + "lesscss", + "php", + "stylesheet" + ] + }, + { + "name": "pear-pear.php.net/File_MARC", + "version": "1.1.1", + "version_normalized": "1.1.1.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/MinkZombieDriver/zipball/cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", - "reference": "cf15a3a0cc4865bb55253cd033a03a20cee6d2d1", - "shasum": "" + "type": "file", + "url": "http://pear.php.net/get/File_MARC-1.1.1.tgz", + "reference": null, + "shasum": null }, "require": { - "behat/mink": "~1.6@dev", - "php": ">=5.3.1", - "symfony/process": "~2.1" + "php": ">=5.3.0.0" }, - "time": "2014-09-26 12:26:25", - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } + "replace": { + "pear-pear/file_marc": "== 1.1.1.0" }, + "type": "pear-library", "installation-source": "dist", "autoload": { - "psr-0": { - "Behat\\Mink\\Driver": "src/" - } + "classmap": [ + "" + ] }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "include-path": [ + "/" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Pascal Cremer", - "email": "b00gizm@gmail.com", - "homepage": "http://github.com/b00gizm" - } + "license": [ + "GNU Lesser General Public License" ], - "description": "Zombie.js driver for Mink framework", - "homepage": "http://mink.behat.org/", - "keywords": [ - "ajax", - "browser", - "headless", - "javascript", - "testing", - "zombie" - ] + "description": "The standard for machine-readable cataloging (MARC) records is documented at http://loc.gov/marc/. This package enables you to read existing MARC records from a file, string, or (using the YAZ extension), from a Z39.50 source. You can also use this package to create new MARC records.\n\nThis package is based on the PHP MARC package, originally called \"php-marc\", that is part of the Emilda Project (http://www.emilda.org). Christoffer Landtman generously agreed to make the \"php-marc\" code available under the GNU LGPL so it could be used as the basis of this PEAR package." }, { - "name": "ocramius/proxy-manager", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/ProxyManager.git", - "reference": "a80a39fac4fbd771aea7d3871929933a3a1bbf3e" - }, + "name": "pear-pear.php.net/XML_Util", + "version": "1.3.0", + "version_normalized": "1.3.0.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/a80a39fac4fbd771aea7d3871929933a3a1bbf3e", - "reference": "a80a39fac4fbd771aea7d3871929933a3a1bbf3e", - "shasum": "" + "type": "file", + "url": "http://pear.php.net/get/XML_Util-1.3.0.tgz", + "reference": null, + "shasum": null }, "require": { - "php": ">=5.3.3", - "zendframework/zend-code": ">2.2.5,<3.0" - }, - "require-dev": { - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "1.5.*" - }, - "suggest": { - "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects", - "zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)", - "zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)", - "zendframework/zend-stdlib": "To use the hydrator proxy", - "zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)" + "ext-pcre": "*", + "php": ">=5.3.0.0" }, - "time": "2014-12-12 10:59:05", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } + "replace": { + "pear-pear/xml_util": "== 1.3.0.0" }, + "type": "pear-library", "installation-source": "dist", "autoload": { - "psr-0": { - "ProxyManager\\": "src" - } + "classmap": [ + "" + ] }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "include-path": [ + "/" ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } + "license": [ + "BSD License" ], - "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies", - "homepage": "https://github.com/Ocramius/ProxyManager", - "keywords": [ - "aop", - "lazy loading", - "proxy", - "proxy pattern", - "service proxies" - ] + "description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more." }, { - "name": "behat/mink", - "version": "v1.6.1", - "version_normalized": "1.6.1.0", - "source": { - "type": "git", - "url": "https://github.com/minkphp/Mink.git", - "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a" - }, + "name": "pear-pear.php.net/Console_Getopt", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/Mink/zipball/8b68523a339ec991bcd638b39dc8f04f808da88a", - "reference": "8b68523a339ec991bcd638b39dc8f04f808da88a", - "shasum": "" + "type": "file", + "url": "http://pear.php.net/get/Console_Getopt-1.4.0.tgz", + "reference": null, + "shasum": null }, "require": { - "php": ">=5.3.1", - "symfony/css-selector": "~2.0" - }, - "suggest": { - "behat/mink-browserkit-driver": "extremely fast headless driver for Symfony\\Kernel-based apps (Sf2, Silex)", - "behat/mink-goutte-driver": "fast headless driver for any app without JS emulation", - "behat/mink-selenium2-driver": "slow, but JS-enabled driver for any app (requires Selenium2)", - "behat/mink-zombie-driver": "fast and JS-enabled headless driver for any app (requires node.js)" + "php": ">=5.4.0.0" }, - "time": "2015-02-04 17:02:06", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } + "replace": { + "pear-pear/console_getopt": "== 1.4.0.0" }, + "type": "pear-library", "installation-source": "dist", "autoload": { - "psr-4": { - "Behat\\Mink\\": "src/" - } + "classmap": [ + "" + ] }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "include-path": [ + "/" ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } + "license": [ + "PHP License" ], - "description": "Browser controller/emulator abstraction for PHP", - "homepage": "http://mink.behat.org/", - "keywords": [ - "browser", - "testing", - "web" - ] + "description": "This is a PHP implementation of "getopt" supporting both\nshort and long options." }, { - "name": "zfr/rbac", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/zf-fr/rbac.git", - "reference": "493711bfc2a637fd7c6f23b71b7b55a621c35d9d" - }, + "name": "pear-pear.php.net/Structures_Graph", + "version": "1.1.0", + "version_normalized": "1.1.0.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zf-fr/rbac/zipball/493711bfc2a637fd7c6f23b71b7b55a621c35d9d", - "reference": "493711bfc2a637fd7c6f23b71b7b55a621c35d9d", - "shasum": "" + "type": "file", + "url": "http://pear.php.net/get/Structures_Graph-1.1.0.tgz", + "reference": null, + "shasum": null }, "require": { - "php": ">=5.4" + "php": ">=5.3.0.0" }, - "require-dev": { - "phpunit/phpunit": "~3.7", - "satooshi/php-coveralls": "~0.6", - "squizlabs/php_codesniffer": "1.4.*", - "zendframework/zend-servicemanager": "~2.2" + "replace": { + "pear-pear/structures_graph": "== 1.1.0.0" }, - "time": "2014-02-06 14:18:34", - "type": "library", + "type": "pear-library", "installation-source": "dist", "autoload": { - "psr-0": { - "Rbac\\": "src/" - } + "classmap": [ + "" + ] }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" + "include-path": [ + "/" ], - "authors": [ - { - "name": "Michaël Gallego", - "email": "mic.gallego@gmail.com", - "homepage": "http://michaelgallego.fr" - } + "license": [ + "LGPL License" ], - "description": "Zend Framework 3 prototype for Zend\\Permissions\\Rbac.", - "homepage": "https://github.com/zf-fr/rbac", - "keywords": [ - "rbac", - "security", - "zf2", - "zf3" - ] + "description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology." }, { - "name": "vufind-org/vufindhttp", - "version": "v1.0.4", - "version_normalized": "1.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/vufind-org/vufindhttp.git", - "reference": "1b03d31c914faa6e50b6fe811fe609328d1d287b" - }, + "name": "pear-pear.php.net/Archive_Tar", + "version": "1.3.16", + "version_normalized": "1.3.16.0", "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/1b03d31c914faa6e50b6fe811fe609328d1d287b", - "reference": "1b03d31c914faa6e50b6fe811fe609328d1d287b", - "shasum": "" + "type": "file", + "url": "http://pear.php.net/get/Archive_Tar-1.3.16.tgz", + "reference": null, + "shasum": null }, "require": { - "zendframework/zend-http": ">=2.2" + "php": ">=4.3.0.0" }, - "require-dev": { - "zendframework/zend-uri": ">=2.2" + "replace": { + "pear-pear/archive_tar": "== 1.3.16.0" }, - "time": "2015-03-10 16:22:47", - "type": "library", + "type": "pear-library", "installation-source": "dist", "autoload": { - "psr-0": { - "VuFindHttp\\": "src/" - } + "classmap": [ + "" + ] }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-2.0" + "include-path": [ + "/" ], - "authors": [ - { - "name": "David Maus", - "email": "maus@hab.de", - "role": "Developer" - }, - { - "name": "Demian Katz", - "email": "demian.katz@villanova.edu", - "role": "Maintainer" - } + "license": [ + "New BSD\n License" ], - "description": "VuFind 2.x HTTP service library", - "homepage": "http://vufind.org/" + "description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded." }, { - "name": "pear-pear.php.net/Console_Getopt", - "version": "1.4.0", - "version_normalized": "1.4.0.0", + "name": "pear-pear.php.net/PEAR", + "version": "1.9.5", + "version_normalized": "1.9.5.0", "dist": { "type": "file", - "url": "http://pear.php.net/get/Console_Getopt-1.4.0.tgz", + "url": "http://pear.php.net/get/PEAR-1.9.5.tgz", "reference": null, "shasum": null }, "require": { - "php": ">=5.4.0.0" + "ext-pcre": "*", + "ext-xml": "*", + "pear-pear.php.net/archive_tar": ">=1.3.11.0", + "pear-pear.php.net/console_getopt": ">=1.2.0.0", + "pear-pear.php.net/structures_graph": ">=1.0.2.0", + "pear-pear.php.net/xml_util": ">=1.2.0.0", + "php": ">=4.4.0.0,!=5.0.0.0,!=5.1.0.0,!=5.1.1.0,!=5.1.2.0,!=5.1.3.0,!=5.1.4.0,!=5.1.5.0" + }, + "conflict": { + "pear-pear.php.net/pear_frontend_gtk": "<0.4.0.0", + "pear-pear.php.net/pear_frontend_web": "<=0.4.0.0" }, "replace": { - "pear-pear/console_getopt": "== 1.4.0.0" + "pear-pear/pear": "== 1.9.5.0" }, "type": "pear-library", "installation-source": "dist", @@ -842,25 +955,25 @@ "/" ], "license": [ - "PHP License" + "New BSD License" ], - "description": "This is a PHP implementation of "getopt" supporting both\nshort and long options." - }, - { - "name": "pear-pear.php.net/Structures_Graph", - "version": "1.1.0", - "version_normalized": "1.1.0.0", + "description": "The PEAR package contains:\n * the PEAR installer, for creating, distributing\n and installing packages\n * the PEAR_Exception PHP5 error handling mechanism\n * the PEAR_ErrorStack advanced error handling mechanism\n * the PEAR_Error error handling mechanism\n * the OS_Guess class for retrieving info about the OS\n where PHP is running on\n * the System class for quick handling of common operations\n with files and directories\n * the PEAR base class\n Features in a nutshell:\n * full support for channels\n * pre-download dependency validation\n * new package.xml 2.0 format allows tremendous flexibility while maintaining BC\n * support for optional dependency groups and limited support for sub-packaging\n * robust dependency support\n * full dependency validation on uninstall\n * remote install for hosts with only ftp access - no more problems with\n restricted host installation\n * full support for mirroring\n * support for bundling several packages into a single tarball\n * support for static dependencies on a url-based package\n * support for custom file roles and installation tasks" + }, + { + "name": "pear-pear.php.net/Validate", + "version": "0.8.5", + "version_normalized": "0.8.5.0", "dist": { "type": "file", - "url": "http://pear.php.net/get/Structures_Graph-1.1.0.tgz", + "url": "http://pear.php.net/get/Validate-0.8.5.tgz", "reference": null, "shasum": null }, "require": { - "php": ">=5.3.0.0" + "php": ">=4.2.0.0" }, "replace": { - "pear-pear/structures_graph": "== 1.1.0.0" + "pear-pear/validate": "== 0.8.5.0" }, "type": "pear-library", "installation-source": "dist", @@ -873,26 +986,26 @@ "/" ], "license": [ - "LGPL License" + "New BSD" ], - "description": "Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed\nand undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing\nas well as for characteristic extraction from the graph topology." + "description": "Package to validate various datas. It includes :\n - numbers (min/max, decimal or not)\n - email (syntax, domain check, rfc822)\n - string (predifined type alpha upper and/or lowercase, numeric,...)\n - date (min, max, rfc822 compliant)\n - uri (RFC2396)\n - possibility valid multiple data with a single method call (::multiple)" }, { - "name": "pear-pear.php.net/XML_Util", - "version": "1.3.0", - "version_normalized": "1.3.0.0", + "name": "pear-pear.php.net/Validate_ISPN", + "version": "0.6.1", + "version_normalized": "0.6.1.0", "dist": { "type": "file", - "url": "http://pear.php.net/get/XML_Util-1.3.0.tgz", + "url": "http://pear.php.net/get/Validate_ISPN-0.6.1.tgz", "reference": null, "shasum": null }, "require": { - "ext-pcre": "*", - "php": ">=5.3.0.0" + "pear-pear.php.net/validate": ">=0.5.0.0", + "php": ">=4.1.0.0" }, "replace": { - "pear-pear/xml_util": "== 1.3.0.0" + "pear-pear/validate_ispn": "== 0.6.1.0" }, "type": "pear-library", "installation-source": "dist", @@ -905,388 +1018,281 @@ "/" ], "license": [ - "BSD License" + "New BSD" ], - "description": "Selection of methods that are often needed when working with XML documents. Functionality includes creating of attribute lists from arrays, creation of tags, validation of XML names and more." + "description": "Package containes ISPN (International Standard Product Numbers) validations such as:\n * ISSN\n * ISBN\n * ISMN\n * ISRC (International Standard Recording Code)\n * EAN8\n * EAN13\n * EAN14\n * UCC12\n * SSCC" }, { - "name": "oyejorge/less.php", - "version": "v1.7.0.3", - "version_normalized": "1.7.0.3", + "name": "symfony/yaml", + "version": "v2.6.7", + "version_normalized": "2.6.7.0", + "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/oyejorge/less.php.git", - "reference": "6e08ecb07e6f6d9170c23e8744c58fdd822ad0de" + "url": "https://github.com/symfony/Yaml.git", + "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/oyejorge/less.php/zipball/6e08ecb07e6f6d9170c23e8744c58fdd822ad0de", - "reference": "6e08ecb07e6f6d9170c23e8744c58fdd822ad0de", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/f157ab074e453ecd4c0fa775f721f6e67a99d9e2", + "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2", "shasum": "" }, "require": { - "php": ">=5.2" + "php": ">=5.3.3" }, - "time": "2015-03-10 18:12:59", - "bin": [ - "bin/lessc" - ], + "require-dev": { + "symfony/phpunit-bridge": "~2.7" + }, + "time": "2015-05-02 15:18:45", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { - "Less": "lib/" - }, - "classmap": [ - "lessc.inc.php" - ] + "Symfony\\Component\\Yaml\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Matt Agar", - "homepage": "https://github.com/agar" - }, - { - "name": "Martin JantoÅ¡oviÄ", - "homepage": "https://github.com/Mordred" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { - "name": "Josh Schmidt", - "homepage": "https://github.com/oyejorge" + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP port of the Javascript version of LESS http://lesscss.org", - "homepage": "http://lessphp.gpeasy.com", - "keywords": [ - "css", - "less", - "less.js", - "lesscss", - "php", - "stylesheet" - ] + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com" }, { - "name": "zendframework/zendframework", - "version": "2.3.7", - "version_normalized": "2.3.7.0", + "name": "vufind-org/vufindcode", + "version": "v1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", - "url": "https://github.com/zendframework/zf2.git", - "reference": "a1aae5fdd27a422beb32c56ddf5a197654a0f94a" + "url": "https://github.com/vufind-org/vufindcode.git", + "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0" }, "dist": { "type": "zip", - "url": "https://packages.zendframework.com/composer/zendframework-zendframework-a1aae5fdd27a422beb32c56ddf5a197654a0f94a-zip-06d4c7.zip", - "reference": "2.3.7", - "shasum": "7033dd58d94b0c75fae8a00001f8a7275c218209" + "url": "https://api.github.com/repos/vufind-org/vufindcode/zipball/1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0", + "reference": "1c6a0ad73cdf24c363f0e0564ac29ef1ba323ec0", + "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zendxml": "~1.0-dev" - }, - "replace": { - "zendframework/zend-authentication": "self.version", - "zendframework/zend-barcode": "self.version", - "zendframework/zend-cache": "self.version", - "zendframework/zend-captcha": "self.version", - "zendframework/zend-code": "self.version", - "zendframework/zend-config": "self.version", - "zendframework/zend-console": "self.version", - "zendframework/zend-crypt": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-debug": "self.version", - "zendframework/zend-di": "self.version", - "zendframework/zend-dom": "self.version", - "zendframework/zend-escaper": "self.version", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-feed": "self.version", - "zendframework/zend-file": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-form": "self.version", - "zendframework/zend-http": "self.version", - "zendframework/zend-i18n": "self.version", - "zendframework/zend-inputfilter": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-ldap": "self.version", - "zendframework/zend-loader": "self.version", - "zendframework/zend-log": "self.version", - "zendframework/zend-mail": "self.version", - "zendframework/zend-math": "self.version", - "zendframework/zend-memory": "self.version", - "zendframework/zend-mime": "self.version", - "zendframework/zend-modulemanager": "self.version", - "zendframework/zend-mvc": "self.version", - "zendframework/zend-navigation": "self.version", - "zendframework/zend-paginator": "self.version", - "zendframework/zend-permissions-acl": "self.version", - "zendframework/zend-permissions-rbac": "self.version", - "zendframework/zend-progressbar": "self.version", - "zendframework/zend-resources": "self.version", - "zendframework/zend-serializer": "self.version", - "zendframework/zend-server": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-session": "self.version", - "zendframework/zend-soap": "self.version", - "zendframework/zend-stdlib": "self.version", - "zendframework/zend-tag": "self.version", - "zendframework/zend-test": "self.version", - "zendframework/zend-text": "self.version", - "zendframework/zend-uri": "self.version", - "zendframework/zend-validator": "self.version", - "zendframework/zend-version": "self.version", - "zendframework/zend-view": "self.version", - "zendframework/zend-xmlrpc": "self.version" - }, - "require-dev": { - "doctrine/annotations": ">=1.0", - "fabpot/php-cs-fixer": "1.*", - "ircmaxell/random-lib": "dev-master", - "ircmaxell/security-lib": "dev-master", - "mikey179/vfsstream": "1.2.*", - "phpunit/phpunit": "3.7.*", - "satooshi/php-coveralls": "dev-master", - "sebastianbergmann/phpcov": "1.1.0" - }, - "suggest": { - "doctrine/annotations": "Doctrine Annotations >=1.0 for annotation features", - "ext-intl": "ext/intl for i18n features (included in default builds of PHP)", - "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", - "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", - "zendframework/zendpdf": "ZendPdf for creating PDF representations of barcodes", - "zendframework/zendservice-recaptcha": "ZendService\\ReCaptcha for rendering ReCaptchas in Zend\\Captcha and/or Zend\\Form" + "php": ">=5.3.0" }, - "time": "2015-03-12 16:55:53", - "bin": [ - "bin/classmap_generator.php", - "bin/pluginmap_generator.php", - "bin/templatemap_generator.php" - ], + "time": "2014-09-17 15:48:11", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev", - "dev-develop": "2.4-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { - "Zend\\": "library/" + "VuFindCode\\": "src/" } }, + "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "GPL-2.0" ], - "description": "Zend Framework 2", - "homepage": "http://framework.zend.com/", - "keywords": [ - "framework", - "zf2" + "authors": [ + { + "name": "Demian Katz", + "email": "demian.katz@villanova.edu" + } ], - "support": { - "source": "https://github.com/zendframework/zf2/tree/release-2.3.7", - "issues": "https://github.com/zendframework/zf2/issues" - } + "description": "Class for representing ISBNs (a VuFind support library)" }, { - "name": "zf-commons/zfc-rbac", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", + "name": "vufind-org/vufindhttp", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", "source": { "type": "git", - "url": "https://github.com/ZF-Commons/zfc-rbac.git", - "reference": "80970aba715fd54f63ddde68a24bee22bafb9d17" + "url": "https://github.com/vufind-org/vufindhttp.git", + "reference": "1b03d31c914faa6e50b6fe811fe609328d1d287b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ZF-Commons/zfc-rbac/zipball/80970aba715fd54f63ddde68a24bee22bafb9d17", - "reference": "80970aba715fd54f63ddde68a24bee22bafb9d17", + "url": "https://api.github.com/repos/vufind-org/vufindhttp/zipball/1b03d31c914faa6e50b6fe811fe609328d1d287b", + "reference": "1b03d31c914faa6e50b6fe811fe609328d1d287b", "shasum": "" }, "require": { - "php": ">=5.4", - "zendframework/zend-mvc": "~2.2", - "zendframework/zend-servicemanager": "~2.2", - "zfr/rbac": "~1.2" + "zendframework/zend-http": ">=2.2" }, "require-dev": { - "doctrine/common": "~2.4", - "doctrine/doctrine-module": "~0.8", - "doctrine/doctrine-orm-module": "~0.8", - "phpunit/phpunit": "~3.7", - "satooshi/php-coveralls": "~0.6", - "squizlabs/php_codesniffer": "1.4.*", - "zendframework/zend-developer-tools": "dev-master", - "zendframework/zendframework": "~2.2" - }, - "suggest": { - "doctrine/doctrine-module": "if you want to use Doctrine role provider", - "zendframework/zend-developer-tools": "if you want to show information about the roles" + "zendframework/zend-uri": ">=2.2" }, - "time": "2015-04-16 12:10:33", + "time": "2015-03-10 16:22:47", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "3.0-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { - "ZfcRbac\\": "src/" + "VuFindHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "GPL-2.0" ], "authors": [ { - "name": "Kyle Spraggs", - "email": "theman@spiffyjr.me", - "homepage": "http://www.spiffyjr.me/" - }, - { - "name": "Jean-Marie Leroux", - "email": "jmleroux.pro@gmail.com" + "name": "David Maus", + "email": "maus@hab.de", + "role": "Developer" }, { - "name": "Michaël Gallego", - "email": "mic.gallego@gmail.com", - "homepage": "http://www.michaelgallego.fr" + "name": "Demian Katz", + "email": "demian.katz@villanova.edu", + "role": "Maintainer" } ], - "description": "Zend Framework 2 Module that provides a layer of features of Zend\\Permissions\\Rbac", - "homepage": "http://www.github.com/ZF-Commons/zfc-rbac", - "keywords": [ - "module", - "permissions", - "rbac", - "zf2" - ] + "description": "VuFind 2.x HTTP service library", + "homepage": "http://vufind.org/" }, { - "name": "pear-pear.php.net/Archive_Tar", - "version": "1.3.16", - "version_normalized": "1.3.16.0", + "name": "zendframework/zendrest", + "version": "2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/ZendRest.git", + "reference": "7427d242b4546e5aef1206d2c97e402109d8843e" + }, "dist": { - "type": "file", - "url": "http://pear.php.net/get/Archive_Tar-1.3.16.tgz", - "reference": null, - "shasum": null + "type": "zip", + "url": "https://packages.zendframework.com/composer/zendframework-zendrest-7427d242b4546e5aef1206d2c97e402109d8843e-zip-da96cc.zip", + "reference": "7427d242b4546e5aef1206d2c97e402109d8843e", + "shasum": "cd304d9e2fccccbd98348bfbead7d42b102e565a" }, "require": { - "php": ">=4.3.0.0" - }, - "replace": { - "pear-pear/archive_tar": "== 1.3.16.0" + "php": ">=5.3.3", + "zendframework/zend-http": "~2.0", + "zendframework/zend-uri": "~2.0", + "zendframework/zendxml": "~1.0-dev" }, - "type": "pear-library", + "time": "2014-03-05 22:32:09", + "type": "library", "installation-source": "dist", "autoload": { - "classmap": [ - "" - ] + "psr-0": { + "ZendRest": "library/" + } }, - "include-path": [ - "/" - ], "license": [ - "New BSD\n License" + "BSD-3-Clause" ], - "description": "This class provides handling of tar files in PHP.\nIt supports creating, listing, extracting and adding to tar files.\nGzip support is available if PHP has the zlib extension built-in or\nloaded. Bz2 compression is also supported with the bz2 extension loaded." + "description": " ", + "homepage": "http://packages.zendframework.com/", + "keywords": [ + "rest", + "zf2" + ], + "support": { + "source": "https://github.com/zendframework/ZendRest/tree/release-2.0.2", + "issues": "https://github.com/zendframework/ZendRest/issues" + } }, { - "name": "symfony/yaml", - "version": "v2.6.7", - "version_normalized": "2.6.7.0", - "target-dir": "Symfony/Component/Yaml", + "name": "zendframework/zendservice-amazon", + "version": "2.0.3", + "version_normalized": "2.0.3.0", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2" + "url": "https://github.com/zendframework/ZendService_Amazon.git", + "reference": "f3d44e3488908323c34bf040c045ee71e1196796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/f157ab074e453ecd4c0fa775f721f6e67a99d9e2", - "reference": "f157ab074e453ecd4c0fa775f721f6e67a99d9e2", - "shasum": "" + "url": "https://packages.zendframework.com/composer/zendframework-zendservice-amazon-f3d44e3488908323c34bf040c045ee71e1196796-zip-31bbc0.zip", + "reference": "f3d44e3488908323c34bf040c045ee71e1196796", + "shasum": "b7f77cced220f6738248fc827952ab2c6604a08f" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-crypt": "~2.0", + "zendframework/zend-http": "~2.0", + "zendframework/zend-json": "~2.0", + "zendframework/zendrest": "~2.0", + "zendframework/zendxml": "~1.0-dev" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "zendframework/zend-i18n": "~2.0" }, - "time": "2015-05-02 15:18:45", + "suggest": { + "zendframework/zend-uri": "Zend\\Uri component" + }, + "time": "2014-03-05 22:37:42", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Yaml\\": "" + "ZendService\\Amazon\\": "library/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } + "description": "OOP wrapper for the Amazon web service", + "homepage": "http://packages.zendframework.com/", + "keywords": [ + "amazon", + "ec2", + "s3", + "simpledb", + "sqs", + "zf2" ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com" + "support": { + "source": "https://github.com/zendframework/ZendService_Amazon/tree/master", + "issues": "https://github.com/zendframework/ZendService_Amazon/issues" + } }, { - "name": "symfony/process", - "version": "v2.6.7", - "version_normalized": "2.6.7.0", - "target-dir": "Symfony/Component/Process", + "name": "zfr/rbac", + "version": "1.2.0", + "version_normalized": "1.2.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562" + "url": "https://github.com/zf-fr/rbac.git", + "reference": "493711bfc2a637fd7c6f23b71b7b55a621c35d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", - "reference": "9f3c4baaf840ed849e1b1f7bfd5ae246e8509562", + "url": "https://api.github.com/repos/zf-fr/rbac/zipball/493711bfc2a637fd7c6f23b71b7b55a621c35d9d", + "reference": "493711bfc2a637fd7c6f23b71b7b55a621c35d9d", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.4" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "phpunit/phpunit": "~3.7", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "1.4.*", + "zendframework/zend-servicemanager": "~2.2" }, - "time": "2015-05-02 15:18:45", + "time": "2014-02-06 14:18:34", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Process\\": "" + "Rbac\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1295,50 +1301,67 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Michaël Gallego", + "email": "mic.gallego@gmail.com", + "homepage": "http://michaelgallego.fr" } ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com" + "description": "Zend Framework 3 prototype for Zend\\Permissions\\Rbac.", + "homepage": "https://github.com/zf-fr/rbac", + "keywords": [ + "rbac", + "security", + "zf2", + "zf3" + ] }, { - "name": "symfony/css-selector", - "version": "v2.6.7", - "version_normalized": "2.6.7.0", - "target-dir": "Symfony/Component/CssSelector", + "name": "zf-commons/zfc-rbac", + "version": "v2.5.1", + "version_normalized": "2.5.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/CssSelector.git", - "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d" + "url": "https://github.com/ZF-Commons/zfc-rbac.git", + "reference": "80970aba715fd54f63ddde68a24bee22bafb9d17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/CssSelector/zipball/189cf0f7f56d7c4be3b778df15a7f16a29f3680d", - "reference": "189cf0f7f56d7c4be3b778df15a7f16a29f3680d", + "url": "https://api.github.com/repos/ZF-Commons/zfc-rbac/zipball/80970aba715fd54f63ddde68a24bee22bafb9d17", + "reference": "80970aba715fd54f63ddde68a24bee22bafb9d17", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.4", + "zendframework/zend-mvc": "~2.2", + "zendframework/zend-servicemanager": "~2.2", + "zfr/rbac": "~1.2" }, "require-dev": { - "symfony/phpunit-bridge": "~2.7" + "doctrine/common": "~2.4", + "doctrine/doctrine-module": "~0.8", + "doctrine/doctrine-orm-module": "~0.8", + "phpunit/phpunit": "~3.7", + "satooshi/php-coveralls": "~0.6", + "squizlabs/php_codesniffer": "1.4.*", + "zendframework/zend-developer-tools": "dev-master", + "zendframework/zendframework": "~2.2" }, - "time": "2015-05-02 15:18:45", + "suggest": { + "doctrine/doctrine-module": "if you want to use Doctrine role provider", + "zendframework/zend-developer-tools": "if you want to show information about the roles" + }, + "time": "2015-04-16 12:10:33", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.4-dev", + "dev-develop": "3.0-dev" } }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\CssSelector\\": "" + "ZfcRbac\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1347,19 +1370,27 @@ ], "authors": [ { - "name": "Jean-François Simon", - "email": "jeanfrancois.simon@sensiolabs.com" + "name": "Kyle Spraggs", + "email": "theman@spiffyjr.me", + "homepage": "http://www.spiffyjr.me/" }, { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Jean-Marie Leroux", + "email": "jmleroux.pro@gmail.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Michaël Gallego", + "email": "mic.gallego@gmail.com", + "homepage": "http://www.michaelgallego.fr" } ], - "description": "Symfony CssSelector Component", - "homepage": "https://symfony.com" + "description": "Zend Framework 2 Module that provides a layer of features of Zend\\Permissions\\Rbac", + "homepage": "http://www.github.com/ZF-Commons/zfc-rbac", + "keywords": [ + "module", + "permissions", + "rbac", + "zf2" + ] } ] diff --git a/vendor/los/losrecaptcha/LICENSE b/vendor/los/losrecaptcha/LICENSE new file mode 100644 index 00000000000..383962eb09c --- /dev/null +++ b/vendor/los/losrecaptcha/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2015, Leandro Silva +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of LosReCaptcha nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/los/losrecaptcha/Module.php b/vendor/los/losrecaptcha/Module.php new file mode 100644 index 00000000000..e77ac75d396 --- /dev/null +++ b/vendor/los/losrecaptcha/Module.php @@ -0,0 +1,7 @@ +<?php +/** + * This file is placed here for compatibility with Zendframework 2's ModuleManager. + * It allows usage of this module even without composer. + * The original Module.php is in 'src/LosBase' in order to respect PSR-0 + */ +require_once __DIR__.'/src/LosReCaptcha/Module.php'; diff --git a/vendor/los/losrecaptcha/autoload_classmap.php b/vendor/los/losrecaptcha/autoload_classmap.php new file mode 100644 index 00000000000..7cbf1c5eff7 --- /dev/null +++ b/vendor/los/losrecaptcha/autoload_classmap.php @@ -0,0 +1,10 @@ +<?php +// Generated by ZF2's ./bin/classmap_generator.php +return array( + 'LosReCaptcha\Captcha\ReCaptcha' => __DIR__ . '/src/LosReCaptcha/Captcha/ReCaptcha.php', + 'LosReCaptcha\Form\View\Helper\Captcha\ReCaptcha' => __DIR__ . '/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php', + 'LosReCaptcha\Module' => __DIR__ . '/src/LosReCaptcha/Module.php', + 'LosReCaptcha\Service\Exception' => __DIR__ . '/src/LosReCaptcha/Service/Exception.php', + 'LosReCaptcha\Service\ReCaptcha' => __DIR__ . '/src/LosReCaptcha/Service/ReCaptcha.php', + 'LosReCaptcha\Service\Response' => __DIR__ . '/src/LosReCaptcha/Service/Response.php', +); diff --git a/vendor/los/losrecaptcha/composer.json b/vendor/los/losrecaptcha/composer.json new file mode 100644 index 00000000000..4d1fcc75eb1 --- /dev/null +++ b/vendor/los/losrecaptcha/composer.json @@ -0,0 +1,36 @@ +{ + "name" : "los/losrecaptcha", + "description" : "ZF2 module for integration with new ReCaptcha service form Google", + "require" : { + "php" : ">=5.4.0", + "zendframework/zendframework" : ">=2.3.2,<3.0.0" + }, + "require-dev": { + "satooshi/php-coveralls": "dev-master" + }, + "suggest": { + "los/losbase": "los/losbase for some abstract classes to speed development ", + "los/loslog": "los/loslog for logging", + "los/losui" : "los/losui for twitter bootstrap 3 styling, jquery, chosen and other libraries" + }, + "authors" : [ + { + "name" : "Leandro Silva", + "email" : "leandro@leandrosilva.info", + "homepage" : "http://leandrosilva.info" + } + ], + "keywords" : [ "los", "recaptcha", "captcha", "module", "zf2" ], + "autoload" : { + "psr-4" : { + "LosReCaptcha\\" : "src/" + }, + "psr-0" : { + "LosReCaptcha\\" : "src/" + }, + "classmap" : [ "./" ] + }, + "license" : "BSD-3-Clause", + "type" : "library", + "homepage" : "http://github.com/Lansoweb/LosReCaptcha" +} diff --git a/vendor/los/losrecaptcha/config/module.config.php b/vendor/los/losrecaptcha/config/module.config.php new file mode 100644 index 00000000000..1d29de8f9dd --- /dev/null +++ b/vendor/los/losrecaptcha/config/module.config.php @@ -0,0 +1,8 @@ +<?php +return [ + 'view_helpers' => [ + 'invokables' => [ + 'losrecaptcha/recaptcha' => 'LosReCaptcha\Form\View\Helper\Captcha\ReCaptcha', + ], + ], +]; diff --git a/vendor/los/losrecaptcha/src/LosReCaptcha/Captcha/ReCaptcha.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Captcha/ReCaptcha.php new file mode 100644 index 00000000000..e4efa566f06 --- /dev/null +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Captcha/ReCaptcha.php @@ -0,0 +1,129 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace LosReCaptcha\Captcha; + +use Traversable; +use LosReCaptcha\Service\ReCaptcha as ReCaptchaService; +use Zend\Captcha\ReCaptcha as ZendReCaptcha; +use Zend\Stdlib\ArrayUtils; + +/** + * ReCaptcha adapter + * + * Allows to insert captchas driven by ReCaptcha service + * + * @see http://recaptcha.net/apidocs/captcha/ + */ +class ReCaptcha extends ZendReCaptcha +{ + + /** + * Error messages + * + * @var array + */ + protected $messageTemplates = array( + self::MISSING_VALUE => 'Missing captcha field', + self::ERR_CAPTCHA => 'Failed to validate captcha', + self::BAD_CAPTCHA => 'Captcha value is wrong: %value%' + ); + + /** + * Constructor + * + * @param null|array|Traversable $options + */ + public function __construct($options = null) + { + $this->service = new ReCaptchaService(); + $this->serviceParams = $this->getService()->getParams(); + $this->serviceOptions = $this->getService()->getOptions(); + + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); + } + + if (isset($this->messageTemplates)) { + $this->abstractOptions['messageTemplates'] = $this->messageTemplates; + } + + if (isset($this->messageVariables)) { + $this->abstractOptions['messageVariables'] = $this->messageVariables; + } + + if (is_array($options)) { + $this->setOptions($options); + } + + if (! empty($options)) { + if (array_key_exists('secret_key', $options)) { + $this->getService()->setSecretKey($options['secret_key']); + } elseif (array_key_exists('private_key', $options)) { + $this->getService()->setPrivateKey($options['private_key']); + } + if (array_key_exists('site_key', $options)) { + $this->getService()->setSiteKey($options['site_key']); + } elseif (array_key_exists('public_key', $options)) { + $this->getService()->setPublicKey($options['public_key']); + } + $this->setOptions($options); + } + } + + /** + * Validate captcha + * + * @see \Zend\Validator\ValidatorInterface::isValid() + * @param mixed $value + * @param mixed $context + * @return bool + */ + public function isValid($value, $context = null) + { + if (! is_array($value) && ! is_array($context)) { + $this->error(self::MISSING_VALUE); + return false; + } + + if (! is_array($value) && is_array($context)) { + $value = $context; + } + + if (empty($value[$this->RESPONSE])) { + $this->error(self::MISSING_VALUE); + return false; + } + + $service = $this->getService(); + + $res = $service->verify($value[$this->RESPONSE]); + if (! $res) { + $this->error(self::ERR_CAPTCHA); + return false; + } + + if (! $res->isValid()) { + $this->error(self::BAD_CAPTCHA, $res->getErrorCode()); + $service->setParam('error', $res->getErrorCode()); + return false; + } + + return true; + } + + /** + * Get helper name used to render captcha + * + * @return string + */ + public function getHelperName() + { + return "losrecaptcha/recaptcha"; + } +} diff --git a/vendor/los/losrecaptcha/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php new file mode 100644 index 00000000000..0d1938f8909 --- /dev/null +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Form/View/Helper/Captcha/ReCaptcha.php @@ -0,0 +1,131 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace LosReCaptcha\Form\View\Helper\Captcha; + +use Zend\Captcha\ReCaptcha as CaptchaAdapter; +use Zend\Form\ElementInterface; +use Zend\Form\Exception; +use Zend\Form\View\Helper\FormInput; + +class ReCaptcha extends FormInput +{ + /** + * Invoke helper as functor + * + * Proxies to {@link render()}. + * + * @param ElementInterface $element + * @return string + */ + public function __invoke(ElementInterface $element = null) + { + if (!$element) { + return $this; + } + + return $this->render($element); + } + + /** + * Render ReCaptcha form elements + * + * @param ElementInterface $element + * @throws Exception\DomainException + * @return string + */ + public function render(ElementInterface $element) + { + $attributes = $element->getAttributes(); + $captcha = $element->getCaptcha(); + + if ($captcha === null || !$captcha instanceof CaptchaAdapter) { + throw new Exception\DomainException(sprintf( + '%s requires that the element has a "captcha" attribute implementing Zend\Captcha\AdapterInterface; none found', + __METHOD__ + )); + } + + $name = $element->getName(); + $id = isset($attributes['id']) ? $attributes['id'] : $name; + $responseName = empty($name) ? 'recaptcha_response_field' : $name . '[recaptcha_response_field]'; + $responseId = $id . '-response'; + + $markup = $captcha->getService()->getHtml($name); + $hidden = $this->renderHiddenInput($responseName, $responseId); + $js = $this->renderJsEvents($responseId); + + return $hidden . $markup . $js; + } + + /** + * Render hidden input elements for the response + * + * @param string $responseName + * @param string $responseId + * @return string + */ + protected function renderHiddenInput($responseName, $responseId) + { + $pattern = '<input type="hidden" %s%s'; + $closingBracket = $this->getInlineClosingBracket(); + + $attributes = $this->createAttributesString(array( + 'name' => $responseName, + 'id' => $responseId, + )); + $response = sprintf($pattern, $attributes, $closingBracket); + + return $response; + } + + /** + * Create the JS events used to bind the response value to the submitted form. + * + * @param string $challengeId + * @param string $responseId + * @return string + */ + protected function renderJsEvents($responseId) + { + $elseif = 'else if'; // php-cs-fixer bug + $js =<<<EOJ +<script type="text/javascript" language="JavaScript"> +function windowOnLoad(fn) +{ + var old = window.onload; + window.onload = function () { + if (old) { + old(); + } + fn(); + }; +} +function zendBindEvent(el, eventName, eventHandler) +{ + if (el.addEventListener) { + el.addEventListener(eventName, eventHandler, false); + } $elseif (el.attachEvent) { + el.attachEvent('on'+eventName, eventHandler); + } +} +windowOnLoad(function () { + zendBindEvent( + document.getElementById("$responseId").form, + 'submit', + function (e) { + document.getElementById("$responseId").value = document.getElementById("g-recaptcha-response").value; + } + ); +}); +</script> +EOJ; + return $js; + } +} diff --git a/vendor/los/losrecaptcha/src/LosReCaptcha/Module.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Module.php new file mode 100644 index 00000000000..147312cae19 --- /dev/null +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Module.php @@ -0,0 +1,46 @@ +<?php +namespace LosReCaptcha; + +use Zend\ModuleManager\Feature\AutoloaderProviderInterface; +use Zend\ModuleManager\Feature\LocatorRegisteredInterface; +use DoctrineORMModule\Stdlib\Hydrator\DoctrineEntity; +use Zend\Console\Adapter\AdapterInterface as Console; +use Zend\ModuleManager\Feature\ConsoleUsageProviderInterface; +use Zend\EventManager\EventInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +class Module implements AutoloaderProviderInterface, + LocatorRegisteredInterface +{ + private $sm; + public function onBootstrap(EventInterface $e) + { + $this->sm = $e->getApplication()->getServiceManager(); + } + + public function getServiceConfig() + { + return [ + ]; + } + + public function getAutoloaderConfig() + { + return [ + 'Zend\Loader\ClassMapAutoloader' => [ + __DIR__.'/../../autoload_classmap.php', + ], + 'Zend\Loader\StandardAutoloader' => [ + 'namespaces' => [ + __NAMESPACE__ => __DIR__, + ], + ], + ]; + } + + public function getConfig() + { + return include __DIR__.'/../../config/module.config.php'; + } + +} diff --git a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Exception.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/Exception.php similarity index 93% rename from vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Exception.php rename to vendor/los/losrecaptcha/src/LosReCaptcha/Service/Exception.php index 0463d835a92..d5d15051506 100644 --- a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Exception.php +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/Exception.php @@ -8,7 +8,7 @@ * @package Zend_Service */ -namespace ZendService\ReCaptcha; +namespace LosReCaptcha\Service; /** * Zend_Service_ReCaptcha_Exception diff --git a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/ReCaptcha.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/ReCaptcha.php similarity index 73% rename from vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/ReCaptcha.php rename to vendor/los/losrecaptcha/src/LosReCaptcha/Service/ReCaptcha.php index 1f8fd8c0550..a95cf2a66f7 100644 --- a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/ReCaptcha.php +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/ReCaptcha.php @@ -8,14 +8,13 @@ * @package Zend_Service */ -namespace ZendService\ReCaptcha; +namespace LosReCaptcha\Service; use Traversable; use Zend\Http\Client as HttpClient; use Zend\Http\Request as HttpRequest; use Zend\Stdlib\ArrayUtils; - /** * Zend_Service_ReCaptcha * @@ -44,21 +43,21 @@ class ReCaptcha * * @var string */ - const VERIFY_SERVER = 'http://www.google.com/recaptcha/api/verify'; + const VERIFY_SERVER = 'https://www.google.com/recaptcha/api/siteverify'; /** * Public key used when displaying the captcha * * @var string */ - protected $publicKey = null; + protected $siteKey = null; /** * Private key used when verifying user input * * @var string */ - protected $privateKey = null; + protected $secretKey = null; /** * Ip address used when verifying user input @@ -74,7 +73,6 @@ class ReCaptcha */ protected $params = array( 'ssl' => false, /* Use SSL or not when generating the recaptcha */ - 'error' => null, /* The error message to display in the recaptcha */ 'xhtml' => false /* Enable XHTML output (this will not be XHTML Strict compliant since the IFRAME is necessary when Javascript is disabled) */ @@ -83,13 +81,13 @@ class ReCaptcha /** * Options for tailoring reCaptcha * - * See the different options on http://recaptcha.net/apidocs/captcha/client.html + * See the different options on https://developers.google.com/recaptcha/docs/display#config * * @var array */ protected $options = array( - 'theme' => 'red', - 'lang' => 'en', + 'theme' => 'light', + 'lang' => null, // Auto-detect ); /** @@ -107,20 +105,20 @@ class ReCaptcha /** * Class constructor * - * @param string $publicKey - * @param string $privateKey + * @param string $siteKey + * @param string $secretKey * @param array|Traversable $params * @param array|Traversable $options * @param string $ip */ - public function __construct($publicKey = null, $privateKey = null, $params = null, $options = null, $ip = null, HttpClient $httpClient = null) + public function __construct($siteKey = null, $secretKey = null, $params = null, $options = null, $ip = null, HttpClient $httpClient = null) { - if ($publicKey !== null) { - $this->setPublicKey($publicKey); + if ($siteKey !== null) { + $this->setPublicKey($siteKey); } - if ($privateKey !== null) { - $this->setPrivateKey($privateKey); + if ($secretKey !== null) { + $this->setPrivateKey($secretKey); } if ($ip !== null) { @@ -319,6 +317,52 @@ class ReCaptcha return $this->options[$key]; } + /** + * Get the site key + * + * @return string + */ + public function getSiteKey() + { + return $this->siteKey; + } + + /** + * Set the site key + * + * @param string $siteKey + * @return \ZendService\ReCaptcha\ReCaptcha + */ + public function setSiteKey($siteKey) + { + $this->siteKey = $siteKey; + + return $this; + } + + /** + * Get the secret key + * + * @return string + */ + public function getSecretKey() + { + return $this->secretKey; + } + + /** + * Set the secret key + * + * @param string $secreteKey + * @return \ZendService\ReCaptcha\ReCaptcha + */ + public function setSecretKey($secretKey) + { + $this->secretKey = $secretKey; + + return $this; + } + /** * Get the public key * @@ -326,7 +370,7 @@ class ReCaptcha */ public function getPublicKey() { - return $this->publicKey; + return $this->getSiteKey(); } /** @@ -337,9 +381,7 @@ class ReCaptcha */ public function setPublicKey($publicKey) { - $this->publicKey = $publicKey; - - return $this; + return $this->setSiteKey($publicKey); } /** @@ -349,7 +391,7 @@ class ReCaptcha */ public function getPrivateKey() { - return $this->privateKey; + return $this->getSecretKey(); } /** @@ -360,9 +402,7 @@ class ReCaptcha */ public function setPrivateKey($privateKey) { - $this->privateKey = $privateKey; - - return $this; + return $this->setSecretKey($privateKey); } /** @@ -376,7 +416,7 @@ class ReCaptcha */ public function getHtml($name = null) { - if ($this->publicKey === null) { + if ($this->siteKey === null) { throw new Exception('Missing public key'); } @@ -394,60 +434,42 @@ class ReCaptcha $htmlInputClosing = '/>'; } - $errorPart = ''; - - if (!empty($this->params['error'])) { - $errorPart = '&error=' . urlencode($this->params['error']); - } - - $reCaptchaOptions = ''; + $langOption = ''; - if (!empty($this->options)) { - $encoded = \Zend\Json\Json::encode($this->options); - $reCaptchaOptions = <<<SCRIPT -<script type="text/javascript"> - var RecaptchaOptions = {$encoded}; -</script> -SCRIPT; - } - $challengeField = 'recaptcha_challenge_field'; - $responseField = 'recaptcha_response_field'; - if (!empty($name)) { - $challengeField = $name . '[' . $challengeField . ']'; - $responseField = $name . '[' . $responseField . ']'; + if (isset($this->options['lang']) && !empty($this->options['lang'])) { + $langOption = "?hl={$this->options['lang']}"; } - $return = $reCaptchaOptions; - $return .= <<<HTML -<script type="text/javascript" - src="{$host}/challenge?k={$this->publicKey}{$errorPart}"> -</script> -HTML; - $return .= <<<HTML + $return = <<<HTML +<div id="recaptcha_widget" class="g-recaptcha" data-sitekey="{$this->siteKey}" data-theme="{$this->options['theme']}"></div> <noscript> - <iframe src="{$host}/noscript?k={$this->publicKey}{$errorPart}" - height="300" width="500" frameborder="0"></iframe>{$htmlBreak} - <textarea name="{$challengeField}" rows="3" cols="40"> - </textarea> - <input type="hidden" name="{$responseField}" - value="manual_challenge"{$htmlInputClosing} + <div style="width: 302px; height: 352px;"> + <div style="width: 302px; height: 352px; position: relative;"> + <div style="width: 302px; height: 352px; position: absolute;"> + <iframe src="{$host}/fallback?k={$this->siteKey}" frameborder="0" scrolling="no" style="width: 302px; height:352px; border-style: none;"></iframe> + </div> + <div style="width: 250px; height: 80px; position: absolute; border-style: none; bottom: 21px; left: 25px; margin: 0px; padding: 0px; right: 25px;"> + <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 80px; border: 1px solid #c1c1c1; margin: 0px; padding: 0px; resize: none;" value=""></textarea> + </div> + </div> + </div> </noscript> +<script type="text/javascript" src="{$host}.js{$langOption}" async defer></script> HTML; return $return; } /** - * Post a solution to the verify server + * Gets a solution to the verify server * - * @param string $challengeField * @param string $responseField * @return \Zend\Http\Response * @throws \ZendService\ReCaptcha\Exception */ - protected function post($challengeField, $responseField) + protected function query($responseField) { - if ($this->privateKey === null) { + if ($this->secretKey === null) { throw new Exception('Missing private key'); } @@ -455,26 +477,17 @@ HTML; throw new Exception('Missing ip address'); } - if (empty($challengeField)) { - throw new Exception('Missing challenge field'); - } - - if (empty($responseField)) { - throw new Exception('Missing response field'); - } - /* Fetch an instance of the http client */ $httpClient = $this->getHttpClient(); - $postParams = array('privatekey' => $this->privateKey, + $queryParams = array('secret' => $this->secretKey, 'remoteip' => $this->ip, - 'challenge' => $challengeField, 'response' => $responseField); $request = new HttpRequest; $request->setUri(self::VERIFY_SERVER); - $request->getPost()->fromArray($postParams); - $request->setMethod(HttpRequest::METHOD_POST); + $request->getQuery()->fromArray($queryParams); + $request->setMethod(HttpRequest::METHOD_GET); $httpClient->setEncType($httpClient::ENC_URLENCODED); return $httpClient->send($request); @@ -486,13 +499,12 @@ HTML; * This method calls up the post method and returns a * Zend_Service_ReCaptcha_Response object. * - * @param string $challengeField * @param string $responseField * @return \ZendService\ReCaptcha\Response */ - public function verify($challengeField, $responseField) + public function verify($responseField) { - $response = $this->post($challengeField, $responseField); + $response = $this->query($responseField); return new Response(null, null, $response); } } diff --git a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Response.php b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/Response.php similarity index 86% rename from vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Response.php rename to vendor/los/losrecaptcha/src/LosReCaptcha/Service/Response.php index dbf3f0e169f..7ed9a337b19 100644 --- a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/Response.php +++ b/vendor/los/losrecaptcha/src/LosReCaptcha/Service/Response.php @@ -8,7 +8,7 @@ * @package Zend_Service */ -namespace ZendService\ReCaptcha; +namespace LosReCaptcha\Service; use Zend\Http\Response as HTTPResponse; @@ -65,16 +65,12 @@ class Response /** * Set the status * - * @param string $status + * @param boolean $status * @return \ZendService\ReCaptcha\Response */ public function setStatus($status) { - if ($status === 'true') { - $this->status = true; - } else { - $this->status = false; - } + $this->status = (bool) $status; return $this; } @@ -132,13 +128,16 @@ class Response { $body = $response->getBody(); - $parts = explode("\n", $body, 2); + $parts = json_decode($body, true); + + $status = false; + $errorCode = ''; - if (count($parts) !== 2) { - $status = 'false'; - $errorCode = ''; - } else { - list($status, $errorCode) = $parts; + if (is_array($parts) && array_key_exists('success', $parts)) { + $status = $parts['success']; + if (array_key_exists('error-codes', $parts)) { + $errorCode = implode(', ',$parts['error-codes']); + } } $this->setStatus($status); diff --git a/vendor/zendframework/zendservice-recaptcha/.gitignore b/vendor/zendframework/zendservice-recaptcha/.gitignore deleted file mode 100644 index 48b8bf9072d..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor/ diff --git a/vendor/zendframework/zendservice-recaptcha/.travis.yml b/vendor/zendframework/zendservice-recaptcha/.travis.yml deleted file mode 100644 index 409b789c100..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - -before_install: - - cp tests/TestConfiguration.php.travis tests/TestConfiguration.php - - curl -s https://getcomposer.org/installer | php - - php composer.phar install --dev - -script: - - php ./tests/run-tests.php - -notifications: - irc: "irc.freenode.org#zftalk.2" diff --git a/vendor/zendframework/zendservice-recaptcha/LICENSE.txt b/vendor/zendframework/zendservice-recaptcha/LICENSE.txt deleted file mode 100644 index 36e976016ef..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2005-2012, Zend Technologies USA, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Zend Technologies USA, Inc. nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/zendframework/zendservice-recaptcha/README.md b/vendor/zendframework/zendservice-recaptcha/README.md deleted file mode 100644 index 551338bd7c9..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/README.md +++ /dev/null @@ -1,11 +0,0 @@ -ZendService\ReCaptcha component - -You can install using: - -``` -curl -s https://getcomposer.org/installer | php -php composer.phar install -``` - -At that point, follow the instructions in the documentation folder for actual -usage of the component. (Documentation is forthcoming.) diff --git a/vendor/zendframework/zendservice-recaptcha/composer.json b/vendor/zendframework/zendservice-recaptcha/composer.json deleted file mode 100644 index cf48c924453..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "zendframework/zendservice-recaptcha", - "description": "OOP wrapper for the ReCaptcha web service", - "type": "library", - "keywords": [ - "zf2", - "recaptcha" - ], - "homepage": "http://packages.zendframework.com/", - "license": "BSD-3-Clause", - "autoload": { - "psr-0": { - "ZendService": "library/" - } - }, - "repositories": [ - { - "type": "composer", - "url": "http://packages.zendframework.com/" - } - ], - "require": { - "php": ">=5.3.3", - "zendframework/zend-http": ">=2.0.0", - "zendframework/zend-uri": ">=2.0.0", - "zendframework/zend-version": ">=2.0.0" - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHide.php b/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHide.php deleted file mode 100644 index 31cbc602d44..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHide.php +++ /dev/null @@ -1,328 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service - */ - -namespace ZendService\ReCaptcha; - -use Traversable; -use Zend\Stdlib\ArrayUtils; - -/** - * Zend_Service_ReCaptcha_MailHide - * - * @category Zend - * @package Zend_Service - * @subpackage ReCaptcha - */ -class MailHide extends ReCaptcha -{ - /**#@+ - * Encryption constants - */ - const ENCRYPTION_MODE = MCRYPT_MODE_CBC; - const ENCRYPTION_CIPHER = MCRYPT_RIJNDAEL_128; - const ENCRYPTION_BLOCK_SIZE = 16; - const ENCRYPTION_IV = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; - /**#@-*/ - - /** - * Url to the mailhide server - * - * @var string - */ - const MAILHIDE_SERVER = 'http://mailhide.recaptcha.net/d'; - - /** - * The email address to protect - * - * @var string - */ - protected $email = null; - - /** - * @var \Zend\Validator\ValidatorInterface - */ - protected $emailValidator; - - /** - * Binary representation of the private key - * - * @var string - */ - protected $privateKeyPacked = null; - - /** - * The local part of the email - * - * @var string - */ - protected $emailLocalPart = null; - - /** - * The domain part of the email - * - * @var string - */ - protected $emailDomainPart = null; - - /** - * Local constructor - * - * @param string $publicKey - * @param string $privateKey - * @param string $email - * @param array|Traversable $options - */ - public function __construct($publicKey = null, $privateKey = null, $email = null, $options = null) - { - /* Require the mcrypt extension to be loaded */ - $this->_requireMcrypt(); - - /* If options is a Zend_Config object we want to convert it to an array so we can merge it with the default options */ - if ($options instanceof Traversable) { - $options = ArrayUtils::iteratorToArray($options); - } - - /* Merge if needed */ - if (is_array($options)) { - $options = array_merge($this->getDefaultOptions(), $options); - } else { - $options = $this->getDefaultOptions(); - } - - parent::__construct($publicKey, $privateKey, null, $options); - - if ($email !== null) { - $this->setEmail($email); - } - } - - - /** - * Get emailValidator - * - * @return \Zend\Validator\ValidatorInterface - */ - public function getEmailValidator() - { - if (null === $this->emailValidator) { - $this->setEmailValidator(new \Zend\Validator\EmailAddress()); - } - return $this->emailValidator; - } - - /** - * Set email validator - * - * @param \Zend\Validator\ValidatorInterface $validator - * @return \ZendService\ReCaptcha\MailHide - */ - public function setEmailValidator(\Zend\Validator\ValidatorInterface $validator) - { - $this->emailValidator = $validator; - return $this; - } - - - /** - * See if the mcrypt extension is available - * - * @throws \ZendService\ReCaptcha\MailHideException - */ - protected function _requireMcrypt() - { - if (!extension_loaded('mcrypt')) { - throw new MailHideException('Use of the Zend\\Service\\ReCaptcha\\MailHide component requires the mcrypt extension to be enabled in PHP'); - } - } - - /** - * Serialize as string - * - * When the instance is used as a string it will display the email address. Since we can't - * throw exceptions within this method we will trigger a user warning instead. - * - * @return string - */ - public function __toString() - { - try { - $return = $this->getHtml(); - } catch (\Exception $e) { - $return = ''; - trigger_error($e->getMessage(), E_USER_WARNING); - } - - return $return; - } - - /** - * Get the default set of parameters - * - * @return array - */ - public function getDefaultOptions() - { - return array( - 'encoding' => 'UTF-8', - 'linkTitle' => 'Reveal this e-mail address', - 'linkHiddenText' => '...', - 'popupWidth' => 500, - 'popupHeight' => 300, - ); - } - - /** - * Override the setPrivateKey method - * - * Override the parent method to store a binary representation of the private key as well. - * - * @param string $privateKey - * @return \ZendService\ReCaptcha\MailHide - */ - public function setPrivateKey($privateKey) - { - parent::setPrivateKey($privateKey); - - /* Pack the private key into a binary string */ - $this->privateKeyPacked = pack('H*', $this->privateKey); - - return $this; - } - - /** - * Set the email property - * - * This method will set the email property along with the local and domain parts - * - * @param string $email - * @return \ZendService\ReCaptcha\MailHide - */ - public function setEmail($email) - { - $this->email = $email; - - $validator = $this->getEmailValidator(); - if (!$validator->isValid($email)) { - throw new MailHideException('Invalid email address provided'); - } - - $emailParts = explode('@', $email, 2); - - /* Decide on how much of the local part we want to reveal */ - if (strlen($emailParts[0]) <= 4) { - $emailParts[0] = substr($emailParts[0], 0, 1); - } elseif (strlen($emailParts[0]) <= 6) { - $emailParts[0] = substr($emailParts[0], 0, 3); - } else { - $emailParts[0] = substr($emailParts[0], 0, 4); - } - - $this->emailLocalPart = $emailParts[0]; - $this->emailDomainPart = $emailParts[1]; - - return $this; - } - - /** - * Get the email property - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Get the local part of the email address - * - * @return string - */ - public function getEmailLocalPart() - { - return $this->emailLocalPart; - } - - /** - * Get the domain part of the email address - * - * @return string - */ - public function getEmailDomainPart() - { - return $this->emailDomainPart; - } - - /** - * Get the HTML code needed for the mail hide - * - * @param string $email - * @return string - * @throws \ZendService\ReCaptcha\MailHideException - */ - public function getHtml($email = null) - { - if ($email !== null) { - $this->setEmail($email); - } elseif (null === ($email = $this->getEmail())) { - throw new MailHideException('Missing email address'); - } - - if ($this->publicKey === null) { - throw new MailHideException('Missing public key'); - } - - if ($this->privateKey === null) { - throw new MailHideException('Missing private key'); - } - - /* Generate the url */ - $url = $this->_getUrl(); - - $enc = $this->getOption('encoding'); - - /* Genrate the HTML used to represent the email address */ - $html = htmlentities($this->getEmailLocalPart(), ENT_COMPAT, $enc) - . '<a href="' - . htmlentities($url, ENT_COMPAT, $enc) - . '" onclick="window.open(\'' - . htmlentities($url, ENT_COMPAT, $enc) - . '\', \'\', \'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=' - . $this->options['popupWidth'] - . ',height=' - . $this->options['popupHeight'] - . '\'); return false;" title="' - . $this->options['linkTitle'] - . '">' . $this->options['linkHiddenText'] . '</a>@' - . htmlentities($this->getEmailDomainPart(), ENT_COMPAT, $enc); - - return $html; - } - - /** - * Get the url used on the "hidden" part of the email address - * - * @return string - */ - protected function _getUrl() - { - /* Figure out how much we need to pad the email */ - $numPad = self::ENCRYPTION_BLOCK_SIZE - (strlen($this->email) % self::ENCRYPTION_BLOCK_SIZE); - - /* Pad the email */ - $emailPadded = str_pad($this->email, strlen($this->email) + $numPad, chr($numPad)); - - /* Encrypt the email */ - $emailEncrypted = mcrypt_encrypt(self::ENCRYPTION_CIPHER, $this->privateKeyPacked, $emailPadded, self::ENCRYPTION_MODE, self::ENCRYPTION_IV); - - /* Return the url */ - return self::MAILHIDE_SERVER . '?k=' . $this->publicKey . '&c=' . strtr(base64_encode($emailEncrypted), '+/', '-_'); - } -} diff --git a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHideException.php b/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHideException.php deleted file mode 100644 index 4573a3fdf10..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/library/ZendService/ReCaptcha/MailHideException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service - */ - -namespace ZendService\ReCaptcha; - -/** - * Zend_Service_ReCaptcha_MailHide_Exception - * - * @category Zend - * @package Zend_Service - * @subpackage ReCaptcha - */ -class MailHideException extends Exception -{} diff --git a/vendor/zendframework/zendservice-recaptcha/tests/Bootstrap.php b/vendor/zendframework/zendservice-recaptcha/tests/Bootstrap.php deleted file mode 100644 index 40a74517b84..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/Bootstrap.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend - */ - -/* - * Set error reporting to the level to which Zend Framework code must comply. - */ -error_reporting( E_ALL | E_STRICT ); - -$phpUnitVersion = PHPUnit_Runner_Version::id(); -if ('@package_version@' !== $phpUnitVersion && version_compare($phpUnitVersion, '3.5.0', '<')) { - echo 'This version of PHPUnit (' . PHPUnit_Runner_Version::id() . ') is not supported in Zend Framework 2.x unit tests.' . PHP_EOL; - exit(1); -} -unset($phpUnitVersion); - -/* - * Determine the root, library, and tests directories of the framework - * distribution. - */ -$zfRoot = realpath(dirname(__DIR__)); -$zfCoreLibrary = "$zfRoot/library"; -$zfCoreTests = "$zfRoot/tests"; - -/* - * Prepend the Zend Framework library/ and tests/ directories to the - * include_path. This allows the tests to run out of the box and helps prevent - * loading other copies of the framework code and tests that would supersede - * this copy. - */ -$path = array( - $zfCoreLibrary, - $zfCoreTests, - get_include_path(), -); -set_include_path(implode(PATH_SEPARATOR, $path)); - -/** - * Setup autoloading - */ -include __DIR__ . '/_autoload.php'; - -/* - * Load the user-defined test configuration file, if it exists; otherwise, load - * the default configuration. - */ -if (is_readable($zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php')) { - require_once $zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php'; -} else { - require_once $zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php.dist'; -} - -if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true) { - $codeCoverageFilter = PHP_CodeCoverage_Filter::getInstance(); - - $lastArg = end($_SERVER['argv']); - if (is_dir($zfCoreTests . '/' . $lastArg)) { - $codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary . '/' . $lastArg); - } else if (is_file($zfCoreTests . '/' . $lastArg)) { - $codeCoverageFilter->addDirectoryToWhitelist(dirname($zfCoreLibrary . '/' . $lastArg)); - } else { - $codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary); - } - - /* - * Omit from code coverage reports the contents of the tests directory - */ - $codeCoverageFilter->addDirectoryToBlacklist($zfCoreTests, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PEAR_INSTALL_DIR, ''); - $codeCoverageFilter->addDirectoryToBlacklist(PHP_LIBDIR, ''); - - unset($codeCoverageFilter); -} - - -/** - * Start output buffering, if enabled - */ -if (defined('TESTS_ZEND_OB_ENABLED') && constant('TESTS_ZEND_OB_ENABLED')) { - ob_start(); -} - -/* - * Unset global variables that are no longer needed. - */ -unset($zfRoot, $zfCoreLibrary, $zfCoreTests, $path); diff --git a/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.dist b/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.dist deleted file mode 100644 index cac8b198b95..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.dist +++ /dev/null @@ -1,55 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package UnitTests - */ - -/** - * This file defines configuration for running the unit tests for the Zend - * Framework. Some tests have dependencies to PHP extensions or databases - * which may not necessary installed on the target system. For these cases, - * the ability to disable or configure testing is provided below. Tests for - * components which should run universally are always run by the master - * suite and cannot be disabled. - * - * Do not edit this file. Instead, copy this file to TestConfiguration.php, - * and edit the new file. Never commit passwords to the source code repository. - */ - -/** - * Use the notation: - * - * defined(...) || define(...); - * - * This ensures that, when a test is marked to run in a separate process, - * PHP will not complain of a constant already being defined. - */ - -/** - * GENERAL SETTINGS - * - * OB_ENABLED should be enabled for some tests to check if all functionality - * works as expected. Such tests include those for Zend\Soap and Zend\Session, - * which require that headers not be sent in order to work. - */ -defined('TESTS_ZEND_OB_ENABLED') || define('TESTS_ZEND_OB_ENABLED', false); - -/** - * PHPUnit Code Coverage / Test Report - */ -defined('TESTS_GENERATE_REPORT') || define('TESTS_GENERATE_REPORT', false); -defined('TESTS_GENERATE_REPORT_TARGET') || define('TESTS_GENERATE_REPORT_TARGET', '/path/to/target'); - -/** - * Zend\Service\ReCaptcha tests - */ -defined('TESTS_ZEND_SERVICE_RECAPTCHA_ENABLED') || define('TESTS_ZEND_SERVICE_RECAPTCHA_ENABLED', false); -defined('TESTS_ZEND_SERVICE_RECAPTCHA_ONLINE_ENABLED') || define('TESTS_ZEND_SERVICE_RECAPTCHA_ONLINE_ENABLED', false); -defined('TESTS_ZEND_SERVICE_RECAPTCHA_PUBLIC_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_PUBLIC_KEY', 'public key'); -defined('TESTS_ZEND_SERVICE_RECAPTCHA_PRIVATE_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_PRIVATE_KEY', 'private key'); -defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY', 'public mailhide key'); -defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY', 'private mailhide key'); diff --git a/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.travis b/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.travis deleted file mode 100644 index f49b94cdbf9..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/TestConfiguration.php.travis +++ /dev/null @@ -1,20 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package UnitTests - */ - -/** - * This file defines specific configuration that differs from the standard configuration - * for running the unit tests with Travis-CI (http://www.travis-ci.org) - * - * See TestConfiguration.php.dist to get more details. - * - * Never commit passwords to the source code repository. - */ - -require_once __DIR__ . '/TestConfiguration.php.dist'; diff --git a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/MailHideTest.php b/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/MailHideTest.php deleted file mode 100644 index 55755fe7cf1..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/MailHideTest.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service - */ - -namespace ZendServiceTest\ReCaptcha; - -use ZendService\ReCaptcha; - -/** - * @category Zend - * @package Zend_Service_ReCaptcha - * @subpackage UnitTests - * @group Zend_Service - * @group Zend_Service_ReCaptcha - */ -class MailHideTest extends \PHPUnit_Framework_TestCase -{ - protected $publicKey = TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY; - protected $privateKey = TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY; - protected $mailHide = null; - - public function setUp() - { - if (!extension_loaded('mcrypt')) { - $this->markTestSkipped('ZendService\ReCaptcha tests skipped due to missing mcrypt extension'); - } - if ($this->publicKey == 'public mailhide key' || $this->privateKey == 'private mailhide key') { - $this->markTestSkipped('ZendService\ReCaptcha\MailHide tests skipped due to missing keys'); - } - $this->mailHide = new ReCaptcha\MailHide(); - } - - public function testSetGetPrivateKey() - { - $this->mailHide->setPrivateKey($this->privateKey); - $this->assertSame($this->privateKey, $this->mailHide->getPrivateKey()); - } - - public function testSetGetEmail() - { - $mail = 'mail@example.com'; - - $this->mailHide->setEmail($mail); - $this->assertSame($mail, $this->mailHide->getEmail()); - $this->assertSame('example.com', $this->mailHide->getEmailDomainPart()); - } - - public function testEmailLocalPart() - { - $this->mailHide->setEmail('abcd@example.com'); - $this->assertSame('a', $this->mailHide->getEmailLocalPart()); - - $this->mailHide->setEmail('abcdef@example.com'); - $this->assertSame('abc', $this->mailHide->getEmailLocalPart()); - - $this->mailHide->setEmail('abcdefg@example.com'); - $this->assertSame('abcd', $this->mailHide->getEmailLocalPart()); - } - - public function testConstructor() - { - $mail = 'mail@example.com'; - - $options = array( - 'theme' => 'black', - 'lang' => 'no', - ); - - $config = new \Zend\Config\Config($options); - - $mailHide = new ReCaptcha\MailHide($this->publicKey, $this->privateKey, $mail, $config); - $_options = $mailHide->getOptions(); - - $this->assertSame($this->publicKey, $mailHide->getPublicKey()); - $this->assertSame($this->privateKey, $mailHide->getPrivateKey()); - $this->assertSame($mail, $mailHide->getEmail()); - $this->assertSame($options['theme'], $_options['theme']); - $this->assertSame($options['lang'], $_options['lang']); - } - - protected function _checkHtml($html) - { - $server = ReCaptcha\MailHide::MAILHIDE_SERVER; - $pubKey = $this->publicKey; - - $this->assertEquals(2, substr_count($html, 'k=' . $pubKey)); - $this->assertRegexp('/c\=[a-zA-Z0-9_=-]+"/', $html); - $this->assertRegexp('/c\=[a-zA-Z0-9_=-]+\\\'/', $html); - } - - public function testGetHtml() - { - $mail = 'mail@example.com'; - - $this->mailHide->setEmail($mail); - $this->mailHide->setPublicKey($this->publicKey); - $this->mailHide->setPrivateKey($this->privateKey); - - $html = $this->mailHide->getHtml(); - - $this->_checkHtml($html); - } - - public function testGetHtmlWithNoEmail() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\MailHideException'); - - $html = $this->mailHide->getHtml(); - } - - public function testGetHtmlWithMissingPublicKey() - { - $mail = 'mail@example.com'; - - $this->mailHide->setEmail($mail); - $this->mailHide->setPrivateKey($this->privateKey); - - $this->setExpectedException('Zend\\Service\\ReCaptcha\\MailHideException'); - $html = $this->mailHide->getHtml(); - } - - public function testGetHtmlWithMissingPrivateKey() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\MailHideException'); - - $mail = 'mail@example.com'; - - $this->mailHide->setEmail($mail); - $this->mailHide->setPublicKey($this->publicKey); - - $html = $this->mailHide->getHtml(); - } - - public function testGetHtmlWithParamter() - { - $mail = 'mail@example.com'; - - $this->mailHide->setPublicKey($this->publicKey); - $this->mailHide->setPrivateKey($this->privateKey); - - $html = $this->mailHide->getHtml($mail); - - $this->_checkHtml($html); - } -} diff --git a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ReCaptchaTest.php b/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ReCaptchaTest.php deleted file mode 100644 index b71002a7a11..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ReCaptchaTest.php +++ /dev/null @@ -1,303 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service - */ - -namespace ZendServiceTest\ReCaptcha; - -use ZendService\ReCaptcha\ReCaptcha; -use ZendService\ReCaptcha\Response as ReCaptchaResponse; -use Zend\Config; - -/** - * @category Zend - * @package Zend_Service_ReCaptcha - * @subpackage UnitTests - * @group Zend_Service - * @group Zend_Service_ReCaptcha - */ -class ReCaptchaTest extends \PHPUnit_Framework_TestCase -{ - protected $publicKey = TESTS_ZEND_SERVICE_RECAPTCHA_PUBLIC_KEY; - protected $privateKey = TESTS_ZEND_SERVICE_RECAPTCHA_PRIVATE_KEY; - - /** - * @var ReCaptcha - */ - protected $reCaptcha = null; - - public function setUp() - { - $this->reCaptcha = new ReCaptcha(); - } - - public function testSetAndGet() - { - /* Set and get IP address */ - $ip = '127.0.0.1'; - $this->reCaptcha->setIp($ip); - $this->assertSame($ip, $this->reCaptcha->getIp()); - - /* Set and get public key */ - $this->reCaptcha->setPublicKey($this->publicKey); - $this->assertSame($this->publicKey, $this->reCaptcha->getPublicKey()); - - /* Set and get private key */ - $this->reCaptcha->setPrivateKey($this->privateKey); - $this->assertSame($this->privateKey, $this->reCaptcha->getPrivateKey()); - } - - public function testSingleParam() - { - $key = 'ssl'; - $value = true; - - $this->reCaptcha->setParam($key, $value); - $this->assertSame($value, $this->reCaptcha->getParam($key)); - } - - public function tetsGetNonExistingParam() - { - $this->assertNull($this->reCaptcha->getParam('foobar')); - } - - public function testMultipleParams() - { - $params = array( - 'ssl' => true, - 'error' => 'errorMsg', - 'xhtml' => true, - ); - - $this->reCaptcha->setParams($params); - $_params = $this->reCaptcha->getParams(); - - $this->assertSame($params['ssl'], $_params['ssl']); - $this->assertSame($params['error'], $_params['error']); - $this->assertSame($params['xhtml'], $_params['xhtml']); - } - - public function testSingleOption() - { - $key = 'theme'; - $value = 'black'; - - $this->reCaptcha->setOption($key, $value); - $this->assertSame($value, $this->reCaptcha->getOption($key)); - } - - public function tetsGetNonExistingOption() - { - $this->assertNull($this->reCaptcha->getOption('foobar')); - } - - public function testMultipleOptions() - { - $options = array( - 'theme' => 'black', - 'lang' => 'no', - ); - - $this->reCaptcha->setOptions($options); - $_options = $this->reCaptcha->getOptions(); - - $this->assertSame($options['theme'], $_options['theme']); - $this->assertSame($options['lang'], $_options['lang']); - } - - public function testSetMultipleParamsFromZendConfig() - { - $params = array( - 'ssl' => true, - 'error' => 'errorMsg', - 'xhtml' => true, - ); - - $config = new Config\Config($params); - - $this->reCaptcha->setParams($config); - $_params = $this->reCaptcha->getParams(); - - $this->assertSame($params['ssl'], $_params['ssl']); - $this->assertSame($params['error'], $_params['error']); - $this->assertSame($params['xhtml'], $_params['xhtml']); - } - - public function testSetInvalidParams() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - $var = 'string'; - $this->reCaptcha->setParams($var); - } - - public function testSetMultipleOptionsFromZendConfig() - { - $options = array( - 'theme' => 'black', - 'lang' => 'no', - ); - - $config = new Config\Config($options); - - $this->reCaptcha->setOptions($config); - $_options = $this->reCaptcha->getOptions(); - - $this->assertSame($options['theme'], $_options['theme']); - $this->assertSame($options['lang'], $_options['lang']); - } - - public function testSetInvalidOptions() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - $var = 'string'; - $this->reCaptcha->setOptions($var); - } - - public function testConstructor() - { - $params = array( - 'ssl' => true, - 'error' => 'errorMsg', - 'xhtml' => true, - ); - - $options = array( - 'theme' => 'black', - 'lang' => 'no', - ); - - $ip = '127.0.0.1'; - - $reCaptcha = new ReCaptcha($this->publicKey, $this->privateKey, $params, $options, $ip); - - $_params = $reCaptcha->getParams(); - $_options = $reCaptcha->getOptions(); - - $this->assertSame($this->publicKey, $reCaptcha->getPublicKey()); - $this->assertSame($this->privateKey, $reCaptcha->getPrivateKey()); - $this->assertSame($params['ssl'], $_params['ssl']); - $this->assertSame($params['error'], $_params['error']); - $this->assertSame($params['xhtml'], $_params['xhtml']); - $this->assertSame($options['theme'], $_options['theme']); - $this->assertSame($options['lang'], $_options['lang']); - $this->assertSame($ip, $reCaptcha->getIp()); - } - - public function testConstructorWithNoIp() - { - // Fake the _SERVER value - $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; - - $reCaptcha = new ReCaptcha(null, null, null, null, null); - - $this->assertSame($_SERVER['REMOTE_ADDR'], $reCaptcha->getIp()); - - unset($_SERVER['REMOTE_ADDR']); - } - - public function testGetHtmlWithNoPublicKey() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - - $html = $this->reCaptcha->getHtml(); - } - - public function testVerify() - { - $this->reCaptcha->setPublicKey($this->publicKey); - $this->reCaptcha->setPrivateKey($this->privateKey); - $this->reCaptcha->setIp('127.0.0.1'); - - if (defined('TESTS_ZEND_SERVICE_RECAPTCHA_ONLINE_ENABLED') && - constant('TESTS_ZEND_SERVICE_RECAPTCHA_ONLINE_ENABLED')) { - - $this->_testVerifyOnline(); - } else { - $this->_testVerifyOffline(); - } - } - - protected function _testVerifyOnline() - { - } - - protected function _testVerifyOffline() - { - $adapter = new \Zend\Http\Client\Adapter\Test(); - $client = new \Zend\Http\Client(null, array( - 'adapter' => $adapter - )); - - $this->reCaptcha->setHttpClient($client); - - $resp = $this->reCaptcha->verify('challengeField', 'responseField'); - - // See if we have a valid object and that the status is false - $this->assertTrue($resp instanceof ReCaptchaResponse); - $this->assertFalse($resp->getStatus()); - } - - public function testGetHtml() - { - $this->reCaptcha->setPublicKey($this->publicKey); - $errorMsg = 'errorMsg'; - $this->reCaptcha->setParam('ssl', true); - $this->reCaptcha->setParam('xhtml', true); - $this->reCaptcha->setParam('error', $errorMsg); - - $html = $this->reCaptcha->getHtml(); - - // See if the options for the captcha exist in the string - $this->assertNotSame(false, strstr($html, 'var RecaptchaOptions = {"theme":"red","lang":"en"};')); - - // See if the js/iframe src is correct - $this->assertNotSame(false, strstr($html, 'src="' . ReCaptcha::API_SECURE_SERVER . '/challenge?k=' . $this->publicKey . '&error=' . $errorMsg . '"')); - } - - /** @group ZF-10991 */ - public function testHtmlGenerationWillUseSuppliedNameForNoScriptElements() - { - $this->reCaptcha->setPublicKey($this->publicKey); - $html = $this->reCaptcha->getHtml('contact'); - $this->assertContains('contact[recaptcha_challenge_field]', $html); - $this->assertContains('contact[recaptcha_response_field]', $html); - } - - public function testVerifyWithMissingPrivateKey() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - - $this->reCaptcha->verify('challenge', 'response'); - } - - public function testVerifyWithMissingIp() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - - $this->reCaptcha->setPrivateKey($this->privateKey); - $this->reCaptcha->verify('challenge', 'response'); - } - - public function testVerifyWithMissingChallengeField() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - - $this->reCaptcha->setPrivateKey($this->privateKey); - $this->reCaptcha->setIp('127.0.0.1'); - $this->reCaptcha->verify('', 'response'); - } - - public function testVerifyWithMissingResponseField() - { - $this->setExpectedException('Zend\\Service\\ReCaptcha\\Exception'); - - $this->reCaptcha->setPrivateKey($this->privateKey); - $this->reCaptcha->setIp('127.0.0.1'); - $this->reCaptcha->verify('challenge', ''); - } -} diff --git a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ResponseTest.php b/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ResponseTest.php deleted file mode 100644 index 046cd9c786b..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/ZendService/ReCaptcha/ResponseTest.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Service - */ - -namespace ZendServiceTest\ReCaptcha; - -use ZendService\ReCaptcha; -use Zend\Http\Response; - -/** - * @category Zend - * @package Zend_Service_ReCaptcha - * @subpackage UnitTests - * @group Zend_Service - * @group Zend_Service_ReCaptcha - */ -class ResponseTest extends \PHPUnit_Framework_TestCase -{ - protected $_response = null; - - public function setUp() - { - $this->_response = new ReCaptcha\Response(); - } - - public function testSetAndGet() - { - /* Set and get status */ - $status = 'true'; - $this->_response->setStatus($status); - $this->assertSame(true, $this->_response->getStatus()); - - $status = 'false'; - $this->_response->setStatus($status); - $this->assertSame(false, $this->_response->getStatus()); - - /* Set and get the error code */ - $errorCode = 'foobar'; - $this->_response->setErrorCode($errorCode); - $this->assertSame($errorCode, $this->_response->getErrorCode()); - } - - public function testIsValid() - { - $this->_response->setStatus('true'); - $this->assertSame(true, $this->_response->isValid()); - } - - public function testIsInvalid() - { - $this->_response->setStatus('false'); - $this->assertSame(false, $this->_response->isValid()); - } - - public function testSetFromHttpResponse() - { - $status = 'false'; - $errorCode = 'foobar'; - $responseBody = $status . "\n" . $errorCode; - $httpResponse = new Response(); - $httpResponse->setStatusCode(200); - $httpResponse->getHeaders()->addHeaderLine('Content-Type', 'text/html'); - $httpResponse->setContent($responseBody); - - $this->_response->setFromHttpResponse($httpResponse); - - $this->assertSame(false, $this->_response->getStatus()); - $this->assertSame($errorCode, $this->_response->getErrorCode()); - } - - public function testConstructor() - { - $status = 'true'; - $errorCode = 'ok'; - - $response = new ReCaptcha\Response($status, $errorCode); - - $this->assertSame(true, $response->getStatus()); - $this->assertSame($errorCode, $response->getErrorCode()); - } - - public function testConstructorWithHttpResponse() - { - $status = 'false'; - $errorCode = 'foobar'; - $responseBody = $status . "\n" . $errorCode; - $httpResponse = new Response(); - $httpResponse->setStatusCode(200); - $httpResponse->getHeaders()->addHeaderLine('Content-Type', 'text/html'); - $httpResponse->setContent($responseBody); - - $response = new ReCaptcha\Response(null, null, $httpResponse); - - $this->assertSame(false, $response->getStatus()); - $this->assertSame($errorCode, $response->getErrorCode()); - } -} diff --git a/vendor/zendframework/zendservice-recaptcha/tests/_autoload.php b/vendor/zendframework/zendservice-recaptcha/tests/_autoload.php deleted file mode 100644 index 24f5cf6bd4d..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/_autoload.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * Setup autoloading - */ -if ($zf2Path = getenv('ZF2_PATH')) { - require_once $zf2Path . '/library/Zend/Loader/StandardAutoloader.php'; - - $loader = new Zend\Loader\StandardAutoloader(array( - Zend\Loader\StandardAutoloader::AUTOREGISTER_ZF => true, - Zend\Loader\StandardAutoloader::LOAD_NS => array( - 'ZendService' => __DIR__ . '/../library/ZendService' - ) - )); - $loader->register(); - -} elseif (!file_exists(__DIR__ . '/../vendor/autoload.php')) { - throw new RuntimeException('This component has dependencies that are unmet. - -Please install composer (http://getcomposer.org), and run the following -command in the root of this project: - - php /path/to/composer.phar install - -After that, you should be able to run tests.'); -} else { - include_once __DIR__ . '/../vendor/autoload.php'; -} - - -spl_autoload_register(function ($class) { - if (0 !== strpos($class, 'ZendServiceTest\\')) { - return false; - } - $normalized = str_replace('ZendServiceTest\\', '', $class); - $filename = __DIR__ . '/ZendService/' . str_replace(array('\\', '_'), '/', $normalized) . '.php'; - if (!file_exists($filename)) { - return false; - } - return include_once $filename; -}); \ No newline at end of file diff --git a/vendor/zendframework/zendservice-recaptcha/tests/phpunit.xml.dist b/vendor/zendframework/zendservice-recaptcha/tests/phpunit.xml.dist deleted file mode 100644 index 55f02b1a7f8..00000000000 --- a/vendor/zendframework/zendservice-recaptcha/tests/phpunit.xml.dist +++ /dev/null @@ -1,13 +0,0 @@ -<phpunit bootstrap="./Bootstrap.php" colors="true"> - <testsuites> - <testsuite name="ZendService ReCaptcha Test Suite"> - <directory>./ZendService</directory> - </testsuite> - </testsuites> - - <groups> - <exclude> - <group>disable</group> - </exclude> - </groups> -</phpunit> -- GitLab