Compare commits

..

1 Commits
2.3.8 ... 2.3.7

Author SHA1 Message Date
9796a3aac4 Release wallabag 2.3.7 2019-03-04 13:25:30 +01:00
33 changed files with 207 additions and 453 deletions

View File

@ -1,21 +1,5 @@
# Changelog # Changelog
## [2.3.8](https://github.com/wallabag/wallabag/tree/2.3.8)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.7...2.3.8)
### Fixes
- Jump to 2.3.8-dev [#3897](https://github.com/wallabag/wallabag/pull/3897)
- material: fix left padding on non-entry pages [#3901](https://github.com/wallabag/wallabag/pull/3901)
- Make dev/install/update script posix compatible [#3860](https://github.com/wallabag/wallabag/pull/3860)
- epub: fix exception when articles have the same title [#3908](https://github.com/wallabag/wallabag/pull/3908)
- Fix PHP warning [#3909](https://github.com/wallabag/wallabag/pull/3909)
- Add ability to match many domains for credentials [#3937](https://github.com/wallabag/wallabag/pull/3937)
- material: add metadata to list view [#3942](https://github.com/wallabag/wallabag/pull/3942)
- Enable no-referrer on img tags, enable strict-origin-when-cross-origin by default [#3943](https://github.com/wallabag/wallabag/pull/3943)
- Remove preview picture from share view page#3922
- Fix Intl Locale issue [#3964](https://github.com/wallabag/wallabag/pull/3964)
## [2.3.7](https://github.com/wallabag/wallabag/tree/2.3.7) ## [2.3.7](https://github.com/wallabag/wallabag/tree/2.3.7)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.6...2.3.7) [Full Changelog](https://github.com/wallabag/wallabag/compare/2.3.6...2.3.7)

View File

@ -18,24 +18,6 @@ main {
overflow: hidden; overflow: hidden;
} }
@mixin mixin-reading-time {
.reading-time {
display: inline-flex;
vertical-align: middle;
.card-reading-time,
.card-created-at {
display: inline-flex;
}
span {
margin-right: 5px;
}
@content;
}
}
.card { .card {
.card-content .card-title, .card-content .card-title,
.card-reveal .card-title { .card-reveal .card-title {
@ -116,7 +98,19 @@ main {
margin-right: 5px !important; margin-right: 5px !important;
} }
@include mixin-reading-time; .reading-time {
display: inline-flex;
vertical-align: middle;
.card-reading-time,
.card-created-at {
display: inline-flex;
}
span {
margin-right: 5px;
}
}
} }
.card-image { .card-image {
@ -230,18 +224,10 @@ a.original:not(.waves-effect) {
} }
div.metadata { div.metadata {
overflow: hidden;
height: 1.5em;
display: flex;
ul.tags {
margin-left: 4px;
}
.chip { .chip {
background-color: $blueAccentColor; background-color: $blueAccentColor;
padding: 0 7px; padding: 0 7px;
margin: auto 1px; margin: auto 2px;
border-radius: 6px; border-radius: 6px;
line-height: 22px; line-height: 22px;
height: 22px; height: 22px;
@ -258,16 +244,6 @@ a.original:not(.waves-effect) {
padding-left: 8px; padding-left: 8px;
} }
} }
@include mixin-reading-time {
padding: 0 5px;
flex-wrap: wrap;
margin-left: auto;
i.material-icons {
font-size: 20px;
}
}
} }
div.card-content { div.card-content {

View File

@ -19,7 +19,7 @@
} }
@media screen and (min-width: 993px) { @media screen and (min-width: 993px) {
body.entry main #content { main #content {
padding-left: 70px; padding-left: 70px;
} }
} }
@ -173,10 +173,6 @@
.row .col { .row .col {
padding: 0; padding: 0;
} }
.card-stacked div.metadata .reading-time {
display: none;
}
} }
@media screen and (max-width: 310px), @media screen and (max-width: 310px),

View File

@ -1,5 +1,5 @@
wallabag_core: wallabag_core:
version: 2.3.8 version: 2.3.7
paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
languages: languages:
en: 'English' en: 'English'

View File

@ -86,8 +86,7 @@
"friendsofsymfony/jsrouting-bundle": "^1.6.3", "friendsofsymfony/jsrouting-bundle": "^1.6.3",
"bdunogier/guzzle-site-authenticator": "^1.0.0", "bdunogier/guzzle-site-authenticator": "^1.0.0",
"defuse/php-encryption": "^2.1", "defuse/php-encryption": "^2.1",
"html2text/html2text": "^4.1", "html2text/html2text": "^4.1"
"sulu/symfony-intl-fix": "^1.0"
}, },
"require-dev": { "require-dev": {
"doctrine/doctrine-fixtures-bundle": "~2.2", "doctrine/doctrine-fixtures-bundle": "~2.2",
@ -126,11 +125,7 @@
}, },
"autoload": { "autoload": {
"psr-4": { "Wallabag\\": "src/Wallabag/" }, "psr-4": { "Wallabag\\": "src/Wallabag/" },
"classmap": [ "app/AppKernel.php", "app/AppCache.php" ], "classmap": [ "app/AppKernel.php", "app/AppCache.php" ]
"exclude-from-classmap": [
"vendor/symfony/intl/Locale.php",
"vendor/symfony/symfony/src/Symfony/Component/Intl/Locale.php"
]
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "Tests\\": "tests/" } "psr-4": { "Tests\\": "tests/" }

286
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ec8c25f2c3bce06d8d23599212a022dd", "content-hash": "9cd56d6ca82444bb7d172424c0ffb378",
"packages": [ "packages": [
{ {
"name": "bdunogier/guzzle-site-authenticator", "name": "bdunogier/guzzle-site-authenticator",
@ -631,16 +631,16 @@
}, },
{ {
"name": "doctrine/doctrine-bundle", "name": "doctrine/doctrine-bundle",
"version": "1.10.3", "version": "1.10.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/DoctrineBundle.git", "url": "https://github.com/doctrine/DoctrineBundle.git",
"reference": "907dafe1ba73c4c3b0f0ae8cfc1b9958c002e58c" "reference": "1f99e6645030542079c57d4680601a4a8778a1bd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/907dafe1ba73c4c3b0f0ae8cfc1b9958c002e58c", "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/1f99e6645030542079c57d4680601a4a8778a1bd",
"reference": "907dafe1ba73c4c3b0f0ae8cfc1b9958c002e58c", "reference": "1f99e6645030542079c57d4680601a4a8778a1bd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -712,7 +712,7 @@
"orm", "orm",
"persistence" "persistence"
], ],
"time": "2019-04-04T08:03:53+00:00" "time": "2019-02-06T13:18:04+00:00"
}, },
{ {
"name": "doctrine/doctrine-cache-bundle", "name": "doctrine/doctrine-cache-bundle",
@ -1299,16 +1299,16 @@
}, },
{ {
"name": "fossar/htmlawed", "name": "fossar/htmlawed",
"version": "1.2.7", "version": "1.2.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fossar/HTMLawed.git", "url": "https://github.com/fossar/HTMLawed.git",
"reference": "4f7505e9622a96242923895c3008719b2c2283d3" "reference": "f83914ca2a5bf450e79462be22486f51a4ae7f79"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fossar/HTMLawed/zipball/4f7505e9622a96242923895c3008719b2c2283d3", "url": "https://api.github.com/repos/fossar/HTMLawed/zipball/f83914ca2a5bf450e79462be22486f51a4ae7f79",
"reference": "4f7505e9622a96242923895c3008719b2c2283d3", "reference": "f83914ca2a5bf450e79462be22486f51a4ae7f79",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1344,7 +1344,7 @@
"strip", "strip",
"tags" "tags"
], ],
"time": "2019-05-09T11:53:40+00:00" "time": "2018-12-14T19:44:53+00:00"
}, },
{ {
"name": "friendsofsymfony/jsrouting-bundle", "name": "friendsofsymfony/jsrouting-bundle",
@ -1724,16 +1724,16 @@
}, },
{ {
"name": "gedmo/doctrine-extensions", "name": "gedmo/doctrine-extensions",
"version": "v2.4.37", "version": "v2.4.36",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Atlantic18/DoctrineExtensions.git", "url": "https://github.com/Atlantic18/DoctrineExtensions.git",
"reference": "5dd471f656e46d815f063bf3f12c667649ec7ffb" "reference": "87c78ff9fd4b90460386f753d95622f6fbbfcb27"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/5dd471f656e46d815f063bf3f12c667649ec7ffb", "url": "https://api.github.com/repos/Atlantic18/DoctrineExtensions/zipball/87c78ff9fd4b90460386f753d95622f6fbbfcb27",
"reference": "5dd471f656e46d815f063bf3f12c667649ec7ffb", "reference": "87c78ff9fd4b90460386f753d95622f6fbbfcb27",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1801,7 +1801,7 @@
"tree", "tree",
"uploadable" "uploadable"
], ],
"time": "2019-03-17T18:16:12+00:00" "time": "2018-07-26T12:16:35+00:00"
}, },
{ {
"name": "grandt/binstring", "name": "grandt/binstring",
@ -3126,16 +3126,16 @@
}, },
{ {
"name": "j0k3r/graby", "name": "j0k3r/graby",
"version": "1.20.0", "version": "1.19.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/j0k3r/graby.git", "url": "https://github.com/j0k3r/graby.git",
"reference": "c7fcea010a6a09f6505b7be0d825ac78801cd831" "reference": "6c1506f19d1bb876fb26bfc11e3e11a993eb7fe8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/j0k3r/graby/zipball/c7fcea010a6a09f6505b7be0d825ac78801cd831", "url": "https://api.github.com/repos/j0k3r/graby/zipball/6c1506f19d1bb876fb26bfc11e3e11a993eb7fe8",
"reference": "c7fcea010a6a09f6505b7be0d825ac78801cd831", "reference": "6c1506f19d1bb876fb26bfc11e3e11a993eb7fe8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3181,20 +3181,20 @@
} }
], ],
"description": "Graby helps you extract article content from web pages", "description": "Graby helps you extract article content from web pages",
"time": "2019-05-11T19:18:07+00:00" "time": "2019-02-13T10:04:47+00:00"
}, },
{ {
"name": "j0k3r/graby-site-config", "name": "j0k3r/graby-site-config",
"version": "1.0.83", "version": "1.0.76",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/j0k3r/graby-site-config.git", "url": "https://github.com/j0k3r/graby-site-config.git",
"reference": "c1109a2969e7b8b7bead8453ad92c0822778dd03" "reference": "efc1be6a13c27414c2b7ad44568949b1045c6dc8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/c1109a2969e7b8b7bead8453ad92c0822778dd03", "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/efc1be6a13c27414c2b7ad44568949b1045c6dc8",
"reference": "c1109a2969e7b8b7bead8453ad92c0822778dd03", "reference": "efc1be6a13c27414c2b7ad44568949b1045c6dc8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3221,20 +3221,20 @@
} }
], ],
"description": "Graby site config files", "description": "Graby site config files",
"time": "2019-05-14T08:12:36+00:00" "time": "2019-03-04T09:22:34+00:00"
}, },
{ {
"name": "j0k3r/php-readability", "name": "j0k3r/php-readability",
"version": "1.2.3", "version": "1.2.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/j0k3r/php-readability.git", "url": "https://github.com/j0k3r/php-readability.git",
"reference": "f808c1b0a21ae98ae6fd5bd623671c406efd74d0" "reference": "3c0289bf8943cbef6a2cc89b645c33617fd38066"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/j0k3r/php-readability/zipball/f808c1b0a21ae98ae6fd5bd623671c406efd74d0", "url": "https://api.github.com/repos/j0k3r/php-readability/zipball/3c0289bf8943cbef6a2cc89b645c33617fd38066",
"reference": "f808c1b0a21ae98ae6fd5bd623671c406efd74d0", "reference": "3c0289bf8943cbef6a2cc89b645c33617fd38066",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3295,7 +3295,7 @@
"extraction", "extraction",
"html" "html"
], ],
"time": "2019-05-11T20:07:19+00:00" "time": "2019-02-07T15:08:33+00:00"
}, },
{ {
"name": "j0k3r/safecurl", "name": "j0k3r/safecurl",
@ -3548,16 +3548,16 @@
}, },
{ {
"name": "jms/serializer", "name": "jms/serializer",
"version": "1.14.0", "version": "1.13.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/schmittjoh/serializer.git", "url": "https://github.com/schmittjoh/serializer.git",
"reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca" "reference": "00863e1d55b411cc33ad3e1de09a4c8d3aae793c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/schmittjoh/serializer/zipball/ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", "url": "https://api.github.com/repos/schmittjoh/serializer/zipball/00863e1d55b411cc33ad3e1de09a4c8d3aae793c",
"reference": "ee96d57024af9a7716d56fcbe3aa94b3d030f3ca", "reference": "00863e1d55b411cc33ad3e1de09a4c8d3aae793c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3597,7 +3597,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-1.x": "1.14-dev" "dev-1.x": "1.13-dev"
} }
}, },
"autoload": { "autoload": {
@ -3628,20 +3628,20 @@
"serialization", "serialization",
"xml" "xml"
], ],
"time": "2019-04-17T08:12:16+00:00" "time": "2018-07-25T13:58:54+00:00"
}, },
{ {
"name": "jms/serializer-bundle", "name": "jms/serializer-bundle",
"version": "2.4.4", "version": "2.4.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/schmittjoh/JMSSerializerBundle.git", "url": "https://github.com/schmittjoh/JMSSerializerBundle.git",
"reference": "92ee808c64c1c180775a0e57d00e3be0674668fb" "reference": "e5231652ce24b8673b2ac70bc76b0cabaf35deea"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/92ee808c64c1c180775a0e57d00e3be0674668fb", "url": "https://api.github.com/repos/schmittjoh/JMSSerializerBundle/zipball/e5231652ce24b8673b2ac70bc76b0cabaf35deea",
"reference": "92ee808c64c1c180775a0e57d00e3be0674668fb", "reference": "e5231652ce24b8673b2ac70bc76b0cabaf35deea",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3702,7 +3702,7 @@
"serialization", "serialization",
"xml" "xml"
], ],
"time": "2019-03-30T10:26:09+00:00" "time": "2018-12-09T07:52:19+00:00"
}, },
{ {
"name": "kphoen/rulerz", "name": "kphoen/rulerz",
@ -3885,16 +3885,16 @@
}, },
{ {
"name": "lexik/form-filter-bundle", "name": "lexik/form-filter-bundle",
"version": "v5.0.10", "version": "v5.0.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/lexik/LexikFormFilterBundle.git", "url": "https://github.com/lexik/LexikFormFilterBundle.git",
"reference": "92df0638173979dc906bda7a33a10b98429d2057" "reference": "c8014b678c8872dfc045c18b159d0b4b85cf7be3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/lexik/LexikFormFilterBundle/zipball/92df0638173979dc906bda7a33a10b98429d2057", "url": "https://api.github.com/repos/lexik/LexikFormFilterBundle/zipball/c8014b678c8872dfc045c18b159d0b4b85cf7be3",
"reference": "92df0638173979dc906bda7a33a10b98429d2057", "reference": "c8014b678c8872dfc045c18b159d0b4b85cf7be3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3904,11 +3904,8 @@
"symfony/framework-bundle": "~2.8|~3.0|^4.0" "symfony/framework-bundle": "~2.8|~3.0|^4.0"
}, },
"require-dev": { "require-dev": {
"doctrine/mongodb-odm-bundle": "^3.0", "doctrine/mongodb-odm-bundle": "~3.0",
"phpunit/phpunit": "~5.0|^7.5" "phpunit/phpunit": "^5.7|~6.0"
},
"suggest": {
"alcaeus/mongo-php-adapter": "Install this package if using the PHP 7 MongoDB Driver"
}, },
"type": "symfony-bundle", "type": "symfony-bundle",
"extra": { "extra": {
@ -3944,7 +3941,7 @@
"form", "form",
"symfony" "symfony"
], ],
"time": "2019-04-17T17:58:44+00:00" "time": "2018-04-04T11:14:22+00:00"
}, },
{ {
"name": "liip/theme-bundle", "name": "liip/theme-bundle",
@ -4537,16 +4534,16 @@
}, },
{ {
"name": "php-amqplib/php-amqplib", "name": "php-amqplib/php-amqplib",
"version": "v2.9.2", "version": "v2.8.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/php-amqplib/php-amqplib.git", "url": "https://github.com/php-amqplib/php-amqplib.git",
"reference": "76faddcd668dabb8d4f7c00e86b8a9decd781a59" "reference": "84449ffd3f5a7466bbee3946facb3746ff11f075"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/76faddcd668dabb8d4f7c00e86b8a9decd781a59", "url": "https://api.github.com/repos/php-amqplib/php-amqplib/zipball/84449ffd3f5a7466bbee3946facb3746ff11f075",
"reference": "76faddcd668dabb8d4f7c00e86b8a9decd781a59", "reference": "84449ffd3f5a7466bbee3946facb3746ff11f075",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4558,10 +4555,9 @@
"videlalvaro/php-amqplib": "self.version" "videlalvaro/php-amqplib": "self.version"
}, },
"require-dev": { "require-dev": {
"ext-curl": "*",
"nategood/httpful": "^0.2.20",
"phpdocumentor/phpdocumentor": "^2.9", "phpdocumentor/phpdocumentor": "^2.9",
"phpunit/phpunit": "^4.8", "phpunit/phpunit": "^4.8",
"scrutinizer/ocular": "^1.1",
"squizlabs/php_codesniffer": "^2.5" "squizlabs/php_codesniffer": "^2.5"
}, },
"type": "library", "type": "library",
@ -4607,7 +4603,7 @@
"queue", "queue",
"rabbitmq" "rabbitmq"
], ],
"time": "2019-04-24T15:36:21+00:00" "time": "2018-11-13T09:35:17+00:00"
}, },
{ {
"name": "php-amqplib/rabbitmq-bundle", "name": "php-amqplib/rabbitmq-bundle",
@ -5648,42 +5644,6 @@
], ],
"time": "2017-12-24T16:06:50+00:00" "time": "2017-12-24T16:06:50+00:00"
}, },
{
"name": "sulu/symfony-intl-fix",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/sulu/symfony-intl-fix.git",
"reference": "fabb07b8ac325ba6650e70516e94fd7ebb7a8f68"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sulu/symfony-intl-fix/zipball/fabb07b8ac325ba6650e70516e94fd7ebb7a8f68",
"reference": "fabb07b8ac325ba6650e70516e94fd7ebb7a8f68",
"shasum": ""
},
"require": {
"php": "^5.5 || ^7.0"
},
"type": "library",
"autoload": {
"files": [
"./Locale.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alexander Schranz",
"email": "alexander@sulu.io"
}
],
"description": "Provides the symfony/intl fix for new php version also for symfony 2.8",
"time": "2019-04-26T09:40:38+00:00"
},
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v5.4.12", "version": "v5.4.12",
@ -5803,16 +5763,16 @@
}, },
{ {
"name": "symfony/polyfill-apcu", "name": "symfony/polyfill-apcu",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-apcu.git", "url": "https://github.com/symfony/polyfill-apcu.git",
"reference": "a502face1da6a53289480166f24de2c3c68e5c3c" "reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/a502face1da6a53289480166f24de2c3c68e5c3c", "url": "https://api.github.com/repos/symfony/polyfill-apcu/zipball/19e1b73bf255265ad0b568f81766ae2a3266d8d2",
"reference": "a502face1da6a53289480166f24de2c3c68e5c3c", "reference": "19e1b73bf255265ad0b568f81766ae2a3266d8d2",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5821,7 +5781,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -5855,20 +5815,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "82ebae02209c21113908c229e9883c419720738a" "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "82ebae02209c21113908c229e9883c419720738a", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5880,7 +5840,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -5913,20 +5873,20 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-icu", "name": "symfony/polyfill-intl-icu",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-icu.git", "url": "https://github.com/symfony/polyfill-intl-icu.git",
"reference": "999878a3a09d73cae157b0cf89bb6fb2cc073057" "reference": "f22a90256d577c7ef7efad8df1f0201663d57644"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/999878a3a09d73cae157b0cf89bb6fb2cc073057", "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/f22a90256d577c7ef7efad8df1f0201663d57644",
"reference": "999878a3a09d73cae157b0cf89bb6fb2cc073057", "reference": "f22a90256d577c7ef7efad8df1f0201663d57644",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5971,20 +5931,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-01-07T19:39:47+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609" "reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fe5e94c604826c35a32fa832f35bd036b6799609", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
"reference": "fe5e94c604826c35a32fa832f35bd036b6799609", "reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5996,7 +5956,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -6030,20 +5990,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-09-21T13:07:52+00:00"
}, },
{ {
"name": "symfony/polyfill-php56", "name": "symfony/polyfill-php56",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php56.git", "url": "https://github.com/symfony/polyfill-php56.git",
"reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42" "reference": "ff208829fe1aa48ab9af356992bb7199fed551af"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/f4dddbc5c3471e1b700a147a20ae17cdb72dbe42", "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/ff208829fe1aa48ab9af356992bb7199fed551af",
"reference": "f4dddbc5c3471e1b700a147a20ae17cdb72dbe42", "reference": "ff208829fe1aa48ab9af356992bb7199fed551af",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6053,7 +6013,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -6086,20 +6046,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-09-21T06:26:08+00:00"
}, },
{ {
"name": "symfony/polyfill-php70", "name": "symfony/polyfill-php70",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php70.git", "url": "https://github.com/symfony/polyfill-php70.git",
"reference": "bc4858fb611bda58719124ca079baff854149c89" "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/bc4858fb611bda58719124ca079baff854149c89", "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/6b88000cdd431cd2e940caa2cb569201f3f84224",
"reference": "bc4858fb611bda58719124ca079baff854149c89", "reference": "6b88000cdd431cd2e940caa2cb569201f3f84224",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6109,7 +6069,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -6145,20 +6105,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-09-21T06:26:08+00:00"
}, },
{ {
"name": "symfony/polyfill-util", "name": "symfony/polyfill-util",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-util.git", "url": "https://github.com/symfony/polyfill-util.git",
"reference": "b46c6cae28a3106735323f00a0c38eccf2328897" "reference": "3b58903eae668d348a7126f999b0da0f2f93611c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/b46c6cae28a3106735323f00a0c38eccf2328897", "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/3b58903eae668d348a7126f999b0da0f2f93611c",
"reference": "b46c6cae28a3106735323f00a0c38eccf2328897", "reference": "3b58903eae668d348a7126f999b0da0f2f93611c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6167,7 +6127,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -6197,7 +6157,7 @@
"polyfill", "polyfill",
"shim" "shim"
], ],
"time": "2019-02-08T14:16:39+00:00" "time": "2018-09-30T16:36:12+00:00"
}, },
{ {
"name": "symfony/swiftmailer-bundle", "name": "symfony/swiftmailer-bundle",
@ -6514,16 +6474,16 @@
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v1.40.1", "version": "v1.37.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "35889516bbd6bbe46a600c2c33b03515df4a076e" "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/35889516bbd6bbe46a600c2c33b03515df4a076e", "url": "https://api.github.com/repos/twigphp/Twig/zipball/66be9366c76cbf23e82e7171d47cbfa54a057a62",
"reference": "35889516bbd6bbe46a600c2c33b03515df4a076e", "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6538,7 +6498,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.40-dev" "dev-master": "1.37-dev"
} }
}, },
"autoload": { "autoload": {
@ -6576,7 +6536,7 @@
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2019-04-29T14:12:28+00:00" "time": "2019-01-14T14:59:29+00:00"
}, },
{ {
"name": "wallabag/php-mobi", "name": "wallabag/php-mobi",
@ -6698,16 +6658,16 @@
}, },
{ {
"name": "white-october/pagerfanta-bundle", "name": "white-october/pagerfanta-bundle",
"version": "v1.2.4", "version": "v1.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git", "url": "https://github.com/whiteoctober/WhiteOctoberPagerfantaBundle.git",
"reference": "19bf14bf8c72e4205c9ca97028436701fe3991a6" "reference": "3a2f39fecde9b8aefe7c9cbd0baf06bc72ef3e5e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/whiteoctober/WhiteOctoberPagerfantaBundle/zipball/19bf14bf8c72e4205c9ca97028436701fe3991a6", "url": "https://api.github.com/repos/whiteoctober/WhiteOctoberPagerfantaBundle/zipball/3a2f39fecde9b8aefe7c9cbd0baf06bc72ef3e5e",
"reference": "19bf14bf8c72e4205c9ca97028436701fe3991a6", "reference": "3a2f39fecde9b8aefe7c9cbd0baf06bc72ef3e5e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6752,7 +6712,7 @@
"page", "page",
"paging" "paging"
], ],
"time": "2019-02-14T08:42:52+00:00" "time": "2018-12-05T16:58:18+00:00"
}, },
{ {
"name": "willdurand/hateoas", "name": "willdurand/hateoas",
@ -7074,16 +7034,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "composer/semver", "name": "composer/semver",
"version": "1.5.0", "version": "1.4.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/semver.git", "url": "https://github.com/composer/semver.git",
"reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e" "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e", "url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
"reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e", "reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7132,7 +7092,7 @@
"validation", "validation",
"versioning" "versioning"
], ],
"time": "2019-03-19T17:25:45+00:00" "time": "2016-08-30T16:08:34+00:00"
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
@ -7599,16 +7559,16 @@
}, },
{ {
"name": "symfony/phpunit-bridge", "name": "symfony/phpunit-bridge",
"version": "v4.2.8", "version": "v4.2.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/phpunit-bridge.git", "url": "https://github.com/symfony/phpunit-bridge.git",
"reference": "31f2e3c10bc9bd955ca1ae3e4da2bb489205714a" "reference": "2cc651a38fcb831a405c14fcb76fcb00320e7ee8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/31f2e3c10bc9bd955ca1ae3e4da2bb489205714a", "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/2cc651a38fcb831a405c14fcb76fcb00320e7ee8",
"reference": "31f2e3c10bc9bd955ca1ae3e4da2bb489205714a", "reference": "2cc651a38fcb831a405c14fcb76fcb00320e7ee8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7660,20 +7620,20 @@
], ],
"description": "Symfony PHPUnit Bridge", "description": "Symfony PHPUnit Bridge",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2019-04-23T14:37:24+00:00" "time": "2019-02-18T06:49:49+00:00"
}, },
{ {
"name": "symfony/polyfill-php72", "name": "symfony/polyfill-php72",
"version": "v1.11.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php72.git", "url": "https://github.com/symfony/polyfill-php72.git",
"reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c" "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/ab50dcf166d5f577978419edd37aa2bb8eabce0c", "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
"reference": "ab50dcf166d5f577978419edd37aa2bb8eabce0c", "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7682,7 +7642,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.11-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -7715,7 +7675,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2019-02-06T07:57:58+00:00" "time": "2018-09-21T13:07:52+00:00"
} }
], ],
"aliases": [], "aliases": [],

View File

@ -3,14 +3,10 @@
# eg: `sh dev.sh` # eg: `sh dev.sh`
COMPOSER_COMMAND='composer' COMPOSER_COMMAND='composer'
REQUIRE_FILE='scripts/require.sh'
if [ ! -f "$REQUIRE_FILE" ]; then DIR="${BASH_SOURCE}"
echo "Cannot find $REQUIRE_FILE" if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
exit 1 . "$DIR/require.sh"
fi
. "$REQUIRE_FILE"
$COMPOSER_COMMAND install $COMPOSER_COMMAND install
php bin/console wallabag:install php bin/console wallabag:install

View File

@ -25,14 +25,10 @@ if [ "$IGNORE_ROOT" -eq 0 ] && [ "$EUID" == "0" ]; then
fi fi
COMPOSER_COMMAND='composer' COMPOSER_COMMAND='composer'
REQUIRE_FILE='scripts/require.sh'
if [ ! -f "$REQUIRE_FILE" ]; then DIR="${BASH_SOURCE}"
echo "Cannot find $REQUIRE_FILE" if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
exit 1 . "$DIR/require.sh"
fi
. "$REQUIRE_FILE"
TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) TAG=$(git describe --tags $(git rev-list --tags --max-count=1))

View File

@ -28,14 +28,10 @@ set -e
set -u set -u
COMPOSER_COMMAND='composer' COMPOSER_COMMAND='composer'
REQUIRE_FILE='scripts/require.sh'
if [ ! -f "$REQUIRE_FILE" ]; then DIR="${BASH_SOURCE}"
echo "Cannot find $REQUIRE_FILE" if [ ! -d "$DIR" ]; then DIR="$PWD/scripts"; fi
exit 1 . "$DIR/require.sh"
fi
. "$REQUIRE_FILE"
rm -rf var/cache/* rm -rf var/cache/*
git fetch origin git fetch origin

View File

@ -5,38 +5,19 @@ namespace Wallabag\CoreBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Wallabag\CoreBundle\Entity\SiteCredential; use Wallabag\CoreBundle\Entity\SiteCredential;
class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureInterface, ContainerAwareInterface class LoadSiteCredentialData extends AbstractFixture implements OrderedFixtureInterface
{ {
/**
* @var ContainerInterface
*/
private $container;
public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function load(ObjectManager $manager) public function load(ObjectManager $manager)
{ {
$credential = new SiteCredential($this->getReference('admin-user')); $credential = new SiteCredential($this->getReference('admin-user'));
$credential->setHost('.super.com'); $credential->setHost('example.com');
$credential->setUsername($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('.super')); $credential->setUsername('foo');
$credential->setPassword($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('bar')); $credential->setPassword('bar');
$manager->persist($credential);
$credential = new SiteCredential($this->getReference('admin-user'));
$credential->setHost('paywall.example.com');
$credential->setUsername($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('paywall.example'));
$credential->setPassword($this->container->get('wallabag_core.helper.crypto_proxy')->crypt('bar'));
$manager->persist($credential); $manager->persist($credential);

View File

@ -62,24 +62,11 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
$host = substr($host, 4); $host = substr($host, 4);
} }
if (!$this->currentUser) { $credentials = null;
$this->logger->debug('Auth: no current user defined.'); if ($this->currentUser) {
$credentials = $this->credentialRepository->findOneByHostAndUser($host, $this->currentUser->getId());
return false;
} }
$hosts = [$host];
// will try to see for a host without the first subdomain (fr.example.org & .example.org)
$split = explode('.', $host);
if (\count($split) > 1) {
// remove first subdomain
array_shift($split);
$hosts[] = '.' . implode('.', $split);
}
$credentials = $this->credentialRepository->findOneByHostsAndUser($hosts, $this->currentUser->getId());
if (null === $credentials) { if (null === $credentials) {
$this->logger->debug('Auth: no credentials available for host.', ['host' => $host]); $this->logger->debug('Auth: no credentials available for host.', ['host' => $host]);

View File

@ -47,7 +47,6 @@ class ContentProxy
*/ */
public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false) public function updateEntry(Entry $entry, $url, array $content = [], $disableContentUpdate = false)
{ {
$this->graby->toggleImgNoReferrer(true);
if (!empty($content['html'])) { if (!empty($content['html'])) {
$content['html'] = $this->graby->cleanupHtml($content['html'], $url); $content['html'] = $this->graby->cleanupHtml($content['html'], $url);
} }
@ -257,17 +256,18 @@ class ContentProxy
$entry->setTitle($content['open_graph']['og_title']); $entry->setTitle($content['open_graph']['og_title']);
} }
if (empty($content['html'])) { $html = $content['html'];
$content['html'] = $this->fetchingErrorMessage; if (false === $html) {
$html = $this->fetchingErrorMessage;
if (!empty($content['open_graph']['og_description'])) { if (!empty($content['open_graph']['og_description'])) {
$content['html'] .= '<p><i>But we found a short description: </i></p>'; $html .= '<p><i>But we found a short description: </i></p>';
$content['html'] .= $content['open_graph']['og_description']; $html .= $content['open_graph']['og_description'];
} }
} }
$entry->setContent($content['html']); $entry->setContent($html);
$entry->setReadingTime(Utils::getReadingTime($content['html'])); $entry->setReadingTime(Utils::getReadingTime($html));
if (!empty($content['status'])) { if (!empty($content['status'])) {
$entry->setHttpStatus($content['status']); $entry->setHttpStatus($content['status']);

View File

@ -188,7 +188,7 @@ class EntriesExport
foreach ($entry->getTags() as $tag) { foreach ($entry->getTags() as $tag) {
$book->setSubject($tag->getLabel()); $book->setSubject($tag->getLabel());
} }
$filename = sha1(sprintf('%s:%s', $entry->getUrl(), $entry->getTitle())); $filename = sha1($entry->getTitle());
$publishedBy = $entry->getPublishedBy(); $publishedBy = $entry->getPublishedBy();
$authors = $this->translator->trans('export.unknown'); $authors = $this->translator->trans('export.unknown');

View File

@ -19,16 +19,16 @@ class SiteCredentialRepository extends \Doctrine\ORM\EntityRepository
/** /**
* Retrieve one username/password for the given host and userId. * Retrieve one username/password for the given host and userId.
* *
* @param array $hosts An array of host to look for * @param string $host
* @param int $userId * @param int $userId
* *
* @return array|null * @return array|null
*/ */
public function findOneByHostsAndUser($hosts, $userId) public function findOneByHostAndUser($host, $userId)
{ {
$res = $this->createQueryBuilder('s') $res = $this->createQueryBuilder('s')
->select('s.username', 's.password') ->select('s.username', 's.password')
->where('s.host IN (:hosts)')->setParameter('hosts', $hosts) ->where('s.host = :hostname')->setParameter('hostname', $host)
->andWhere('s.user = :userId')->setParameter('userId', $userId) ->andWhere('s.user = :userId')->setParameter('userId', $userId)
->setMaxResults(1) ->setMaxResults(1)
->getQuery() ->getQuery()

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
# form: # form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
# save: Save # save: Save
# delete: Delete # delete: Delete

View File

@ -550,7 +550,7 @@ site_credential:
create_new_one: 'Einen neuen Seitenzugang anlegen' create_new_one: 'Einen neuen Seitenzugang anlegen'
form: form:
username_label: 'Benutzername' username_label: 'Benutzername'
host_label: 'Host (subdomain.example.org, .example.org, etc.)' host_label: 'Host'
password_label: 'Passwort' password_label: 'Passwort'
save: 'Speichern' save: 'Speichern'
delete: 'Löschen' delete: 'Löschen'

View File

@ -550,7 +550,7 @@ site_credential:
create_new_one: Create a new credential create_new_one: Create a new credential
form: form:
username_label: 'Username' username_label: 'Username'
host_label: 'Host (subdomain.example.org, .example.org, etc.)' host_label: 'Host'
password_label: 'Password' password_label: 'Password'
save: Save save: Save
delete: Delete delete: Delete

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
# form: # form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
# save: Save # save: Save
# delete: Delete # delete: Delete

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
# form: # form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
# save: Save # save: Save
# delete: Delete # delete: Delete

View File

@ -550,7 +550,7 @@ site_credential:
create_new_one: Créer un nouvel accès à un site create_new_one: Créer un nouvel accès à un site
form: form:
username_label: 'Identifiant' username_label: 'Identifiant'
host_label: 'Domaine (subdomain.example.org, .example.org, etc.)' host_label: 'Domaine'
password_label: 'Mot de passe' password_label: 'Mot de passe'
save: "Sauvegarder" save: "Sauvegarder"
delete: "Supprimer" delete: "Supprimer"

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
# form: # form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
# save: Save # save: Save
# delete: Delete # delete: Delete

View File

@ -550,7 +550,7 @@ site_credential:
create_new_one: Crear un novèl identificant create_new_one: Crear un novèl identificant
form: form:
username_label: "Nom d'utilizaire" username_label: "Nom d'utilizaire"
host_label: 'Òste (subdomain.example.org, .example.org, etc.)' host_label: 'Òste'
password_label: 'Senhal' password_label: 'Senhal'
save: 'Enregistrar' save: 'Enregistrar'
delete: 'Suprimir' delete: 'Suprimir'

View File

@ -550,7 +550,7 @@ site_credential:
create_new_one: Stwórz nowe poświadczenie create_new_one: Stwórz nowe poświadczenie
form: form:
username_label: 'Nazwa użytkownika' username_label: 'Nazwa użytkownika'
host_label: 'Host (subdomain.example.org, .example.org, etc.)' host_label: 'Host'
password_label: 'Hasło' password_label: 'Hasło'
save: Zapisz save: Zapisz
delete: Usuń delete: Usuń

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
form: form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
save: 'Salvar' save: 'Salvar'
delete: 'Apagar' delete: 'Apagar'

View File

@ -550,7 +550,7 @@ site_credential:
# create_new_one: Create a new credential # create_new_one: Create a new credential
# form: # form:
# username_label: 'Username' # username_label: 'Username'
# host_label: 'Host (subdomain.example.org, .example.org, etc.)' # host_label: 'Host'
# password_label: 'Password' # password_label: 'Password'
# save: Save # save: Save
# delete: Delete # delete: Delete

View File

@ -548,7 +548,7 @@ site_credential:
create_new_one: สร้างข้อมูลส่วนตัวใหม่ create_new_one: สร้างข้อมูลส่วนตัวใหม่
form: form:
username_label: 'ชื่อผู้ใช้' username_label: 'ชื่อผู้ใช้'
host_label: 'โฮส (subdomain.example.org, .example.org, etc.)' host_label: 'โฮส'
password_label: 'รหัสผ่าน' password_label: 'รหัสผ่าน'
save: บันทึก save: บันทึก
delete: ลบ delete: ลบ

View File

@ -8,7 +8,6 @@
{% block head %} {% block head %}
<meta name="viewport" content="initial-scale=1.0"> <meta name="viewport" content="initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="referrer" content="strict-origin-when-cross-origin">
<!--[if IE]> <!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=10"> <meta http-equiv="X-UA-Compatible" content="IE=10">
<![endif]--> <![endif]-->

View File

@ -29,6 +29,9 @@
<h1>{{ entry.title|e|raw }}</h1> <h1>{{ entry.title|e|raw }}</h1>
<a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a> <a href="{{ entry.url|e }}" target="_blank" rel="noopener" title="{{ 'entry.view.original_article'|trans }} : {{ entry.title|e|raw }}" class="tool">{{ entry.domainName|removeWww }}</a>
<p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p> <p class="shared-by">{{ "entry.public.shared_by_wallabag"|trans({'%wallabag_instance%': url('homepage'), '%username%': entry.user.username})|raw }}.</p>
{% if entry.previewPicture is not null %}
<img class="preview" src="{{ entry.previewPicture }}" alt="{{ entry.title|striptags|e('html_attr') }}" />
{% endif %}
</header> </header>
<article class="block"> <article class="block">
{{ entry.content | raw }} {{ entry.content | raw }}

View File

@ -8,11 +8,8 @@
<div class="{{ subClass|default('original grey-text') }}"> <div class="{{ subClass|default('original grey-text') }}">
<a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a> <a href="{{ entry.url|e }}" target="_blank" title="{{ entry.domainName|removeWww }}" class="tool grey-text">{{ entry.domainName|removeWww }}</a>
{% if withMetadata is defined %} {% if withTags is defined %}
{% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %} {% include "@WallabagCore/themes/material/Entry/_tags.html.twig" with {'tags': entry.tags | slice(0, 3), 'entryId': entry.id, 'listClass': ' hide-on-med-and-down'} only %}
<div class="reading-time grey-text">
<div class="card-reading-time">{% include "@WallabagCore/themes/material/Entry/_reading_time.html.twig" with {'entry': entry} only %}</div>
</div>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -5,7 +5,7 @@
<span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span> <span class="preview{{ previewClassModifier }}" style="background-image: url({{ entry.previewPicture | default(asset('wallassets/themes/_global/img/logo-square.svg')) }})"></span>
</a> </a>
</div> </div>
{% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withMetadata': true, 'subClass': 'metadata'} only %} {% include "@WallabagCore/themes/material/Entry/Card/_content.html.twig" with {'entry': entry, 'withTags': true, 'subClass': 'metadata'} only %}
<ul class="tools-list hide-on-small-only"> <ul class="tools-list hide-on-small-only">
<li> <li>
<a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a> <a title="{{ 'entry.list.toogle_as_read'|trans }}" class="tool grey-text" href="{{ path('archive_entry', { 'id': entry.id }) }}"><i class="material-icons">{% if entry.isArchived == 0 %}done{% else %}unarchive{% endif %}</i></a>

View File

@ -166,7 +166,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$this->assertSame($this->url, $content->getUrl()); $this->assertSame($this->url, $content->getUrl());
$this->assertContains('Google', $content->getTitle()); $this->assertContains('Google', $content->getTitle());
$this->assertSame('fr', $content->getLanguage()); $this->assertSame('fr', $content->getLanguage());
$this->assertSame('2015-03-28 11:43:19', $content->getPublishedAt()->format('Y-m-d H:i:s')); $this->assertSame('2016-04-07 19:01:35', $content->getPublishedAt()->format('Y-m-d H:i:s'));
$this->assertArrayHasKey('x-frame-options', $content->getHeaders()); $this->assertArrayHasKey('x-frame-options', $content->getHeaders());
$client->getContainer()->get('craue_config')->set('store_article_headers', 0); $client->getContainer()->get('craue_config')->set('store_article_headers', 0);
} }

View File

@ -5,22 +5,26 @@ namespace Tests\Wallabag\CoreBundle\GuzzleSiteAuthenticator;
use Graby\SiteConfig\SiteConfig as GrabySiteConfig; use Graby\SiteConfig\SiteConfig as GrabySiteConfig;
use Monolog\Handler\TestHandler; use Monolog\Handler\TestHandler;
use Monolog\Logger; use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder; use Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder;
class GrabySiteConfigBuilderTest extends WallabagCoreTestCase class GrabySiteConfigBuilderTest extends TestCase
{ {
/** @var \Wallabag\CoreBundle\GuzzleSiteAuthenticator\GrabySiteConfigBuilder */
protected $builder;
public function testBuildConfigExists() public function testBuildConfigExists()
{ {
/* @var \Graby\SiteConfig\ConfigBuilder|\PHPUnit_Framework_MockObject_MockObject */
$grabyConfigBuilderMock = $this->getMockBuilder('Graby\SiteConfig\ConfigBuilder') $grabyConfigBuilderMock = $this->getMockBuilder('Graby\SiteConfig\ConfigBuilder')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$grabySiteConfig = new GrabySiteConfig(); $grabySiteConfig = new GrabySiteConfig();
$grabySiteConfig->requires_login = true; $grabySiteConfig->requires_login = true;
$grabySiteConfig->login_uri = 'http://api.example.com/login'; $grabySiteConfig->login_uri = 'http://www.example.com/login';
$grabySiteConfig->login_username_field = 'login'; $grabySiteConfig->login_username_field = 'login';
$grabySiteConfig->login_password_field = 'password'; $grabySiteConfig->login_password_field = 'password';
$grabySiteConfig->login_extra_fields = ['field=value']; $grabySiteConfig->login_extra_fields = ['field=value'];
@ -28,7 +32,7 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
$grabyConfigBuilderMock $grabyConfigBuilderMock
->method('buildForHost') ->method('buildForHost')
->with('api.example.com') ->with('example.com')
->will($this->returnValue($grabySiteConfig)); ->will($this->returnValue($grabySiteConfig));
$logger = new Logger('foo'); $logger = new Logger('foo');
@ -39,8 +43,8 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$siteCrentialRepo->expects($this->once()) $siteCrentialRepo->expects($this->once())
->method('findOneByHostsAndUser') ->method('findOneByHostAndUser')
->with(['api.example.com', '.example.com'], 1) ->with('example.com', 1)
->willReturn(['username' => 'foo', 'password' => 'bar']); ->willReturn(['username' => 'foo', 'password' => 'bar']);
$user = $this->getMockBuilder('Wallabag\UserBundle\Entity\User') $user = $this->getMockBuilder('Wallabag\UserBundle\Entity\User')
@ -55,18 +59,18 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
$tokenStorage = new TokenStorage(); $tokenStorage = new TokenStorage();
$tokenStorage->setToken($token); $tokenStorage->setToken($token);
$builder = new GrabySiteConfigBuilder( $this->builder = new GrabySiteConfigBuilder(
$grabyConfigBuilderMock, $grabyConfigBuilderMock,
$tokenStorage, $tokenStorage,
$siteCrentialRepo, $siteCrentialRepo,
$logger $logger
); );
$config = $builder->buildForHost('api.example.com'); $config = $this->builder->buildForHost('www.example.com');
$this->assertSame('api.example.com', $config->getHost()); $this->assertSame('example.com', $config->getHost());
$this->assertTrue($config->requiresLogin()); $this->assertTrue($config->requiresLogin());
$this->assertSame('http://api.example.com/login', $config->getLoginUri()); $this->assertSame('http://www.example.com/login', $config->getLoginUri());
$this->assertSame('login', $config->getUsernameField()); $this->assertSame('login', $config->getUsernameField());
$this->assertSame('password', $config->getPasswordField()); $this->assertSame('password', $config->getPasswordField());
$this->assertSame(['field' => 'value'], $config->getExtraFields()); $this->assertSame(['field' => 'value'], $config->getExtraFields());
@ -81,6 +85,7 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
public function testBuildConfigDoesntExist() public function testBuildConfigDoesntExist()
{ {
/* @var \Graby\SiteConfig\ConfigBuilder|\PHPUnit_Framework_MockObject_MockObject */
$grabyConfigBuilderMock = $this->getMockBuilder('\Graby\SiteConfig\ConfigBuilder') $grabyConfigBuilderMock = $this->getMockBuilder('\Graby\SiteConfig\ConfigBuilder')
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
@ -98,8 +103,8 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
->disableOriginalConstructor() ->disableOriginalConstructor()
->getMock(); ->getMock();
$siteCrentialRepo->expects($this->once()) $siteCrentialRepo->expects($this->once())
->method('findOneByHostsAndUser') ->method('findOneByHostAndUser')
->with(['unknown.com', '.com'], 1) ->with('unknown.com', 1)
->willReturn(null); ->willReturn(null);
$user = $this->getMockBuilder('Wallabag\UserBundle\Entity\User') $user = $this->getMockBuilder('Wallabag\UserBundle\Entity\User')
@ -114,14 +119,14 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
$tokenStorage = new TokenStorage(); $tokenStorage = new TokenStorage();
$tokenStorage->setToken($token); $tokenStorage->setToken($token);
$builder = new GrabySiteConfigBuilder( $this->builder = new GrabySiteConfigBuilder(
$grabyConfigBuilderMock, $grabyConfigBuilderMock,
$tokenStorage, $tokenStorage,
$siteCrentialRepo, $siteCrentialRepo,
$logger $logger
); );
$config = $builder->buildForHost('unknown.com'); $config = $this->builder->buildForHost('unknown.com');
$this->assertFalse($config); $this->assertFalse($config);
@ -129,121 +134,4 @@ class GrabySiteConfigBuilderTest extends WallabagCoreTestCase
$this->assertCount(1, $records, 'One log was recorded'); $this->assertCount(1, $records, 'One log was recorded');
} }
public function testBuildConfigUserNotDefined()
{
$grabyConfigBuilderMock = $this->getMockBuilder('\Graby\SiteConfig\ConfigBuilder')
->disableOriginalConstructor()
->getMock();
$grabyConfigBuilderMock
->method('buildForHost')
->with('unknown.com')
->will($this->returnValue(new GrabySiteConfig()));
$logger = new Logger('foo');
$handler = new TestHandler();
$logger->pushHandler($handler);
$siteCrentialRepo = $this->getMockBuilder('Wallabag\CoreBundle\Repository\SiteCredentialRepository')
->disableOriginalConstructor()
->getMock();
$tokenStorage = new TokenStorage();
$builder = new GrabySiteConfigBuilder(
$grabyConfigBuilderMock,
$tokenStorage,
$siteCrentialRepo,
$logger
);
$config = $builder->buildForHost('unknown.com');
$this->assertFalse($config);
}
public function dataProviderCredentials()
{
return [
[
'host' => 'example.com',
],
[
'host' => 'other.example.com',
],
[
'host' => 'paywall.example.com',
'expectedUsername' => 'paywall.example',
'expectedPassword' => 'bar',
],
[
'host' => 'api.super.com',
'expectedUsername' => '.super',
'expectedPassword' => 'bar',
],
[
'host' => '.super.com',
'expectedUsername' => '.super',
'expectedPassword' => 'bar',
],
];
}
/**
* @dataProvider dataProviderCredentials
*/
public function testBuildConfigWithDbAccess($host, $expectedUsername = null, $expectedPassword = null)
{
$grabyConfigBuilderMock = $this->getMockBuilder('Graby\SiteConfig\ConfigBuilder')
->disableOriginalConstructor()
->getMock();
$grabySiteConfig = new GrabySiteConfig();
$grabySiteConfig->requires_login = true;
$grabySiteConfig->login_uri = 'http://api.example.com/login';
$grabySiteConfig->login_username_field = 'login';
$grabySiteConfig->login_password_field = 'password';
$grabySiteConfig->login_extra_fields = ['field=value'];
$grabySiteConfig->not_logged_in_xpath = '//div[@class="need-login"]';
$grabyConfigBuilderMock
->method('buildForHost')
->with($host)
->will($this->returnValue($grabySiteConfig));
$user = $this->getMockBuilder('Wallabag\UserBundle\Entity\User')
->disableOriginalConstructor()
->getMock();
$user->expects($this->once())
->method('getId')
->willReturn(1);
$token = new UsernamePasswordToken($user, 'pass', 'provider');
$tokenStorage = new TokenStorage();
$tokenStorage->setToken($token);
$logger = new Logger('foo');
$handler = new TestHandler();
$logger->pushHandler($handler);
$builder = new GrabySiteConfigBuilder(
$grabyConfigBuilderMock,
$tokenStorage,
$this->getClient()->getContainer()->get('wallabag_core.site_credential_repository'),
$logger
);
$config = $builder->buildForHost($host);
if (null === $expectedUsername && null === $expectedPassword) {
$this->assertFalse($config);
return;
}
$this->assertSame($expectedUsername, $config->getUsername());
$this->assertSame($expectedPassword, $config->getPassword());
}
} }

File diff suppressed because one or more lines are too long