aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Update LinkFilter to be able to filter only public linksArthurHoaro2017-01-161-10/+63
| | | | | | No update regarding the UI or the API for now Fixes #758
* Remove CSS call for addlink toolbar pluginArthurHoaro2017-01-151-40/+0
| | | | Fixes #724
* Merge pull request #727 from ArthurHoaro/api/getlinksArthurHoaro2017-01-152-0/+458
|\ | | | | REST API: implement getLinks service
| * REST API: implement getLinks serviceArthurHoaro2017-01-152-0/+458
| | | | | | | | See http://shaarli.github.io/api-documentation/#links-links-collection-get
* | API: expect JWT in the Authorization headerVirtualTam2017-01-151-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/pull/731 Added: - require the presence of the 'Authorization' header Changed: - use the HTTP Bearer Token authorization schema See: - https://jwt.io/introduction/#how-do-json-web-tokens-work- - https://tools.ietf.org/html/rfc6750 - http://security.stackexchange.com/q/108662 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | Merge pull request #732 from ArthurHoaro/feature/theme-managerArthur2017-01-064-1/+105
|\ \ | | | | | | Theme manager: improvements
| * | Updater: keep custom theme preference with the new theme settingArthurHoaro2017-01-053-44/+99
| | |
| * | Minor improvements regarding #705 (coding style, unit tests, etc.)ArthurHoaro2017-01-053-1/+47
| | |
| * | Change templates set through administration UIKnah Tsaeb2017-01-051-0/+3
| |/
* | Cleanup: explicit method visibilityVirtualTam2017-01-0511-58/+54
| | | | | | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | API: fix JWT signature verificationVirtualTam2017-01-041-6/+9
|/ | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/shaarli/Shaarli/issues/737 Added: - Base64Url utilities Fixed: - use URL-safe Base64 encoding/decoding functions - use byte representations for HMAC digests - all JWT parts are Base64Url-encoded See: - https://en.wikipedia.org/wiki/JSON_Web_Token - https://tools.ietf.org/html/rfc7519 - https://scotch.io/tutorials/the-anatomy-of-a-json-web-token - https://jwt.io/introduction/ - https://en.wikipedia.org/wiki/Base64#URL_applications - https://secure.php.net/manual/en/function.base64-encode.php#103849 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #733 from ArthurHoaro/hotfix/reverse-proxy-portArthur2017-01-041-0/+13
|\ | | | | Hide default ports in local URL behind a reverse proxy
| * Hide default port in local URL behind a reverse proxyArthurHoaro2017-01-031-0/+13
| |
* | URL cleanup: add 'campaign_' to the annoying parametersVirtualTam2017-01-041-34/+68
|/ | | | | | Closes https://github.com/shaarli/Shaarli/issues/735 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Fixes presence of empty tags for private tags and in search resultsArthurHoaro2017-01-031-1/+13
| | | | | | | * Private tags: make sure empty tags are properly filtered * Search results: * Use preg_split instead of function combination * Add normalize_spaces to remove extra whitespaces displaying empty tags search
* Move PubSubHubbub code as a default pluginArthurHoaro2016-12-202-14/+54
|
* REST API structure using Slim frameworkArthurHoaro2016-12-153-0/+503
| | | | | | * REST API routes are handle by Slim. * Every API controller go through ApiMiddleware which handles security. * First service implemented `/info`, for tests purpose.
* Prepare settings for the API in the admin page and during the installArthurHoaro2016-12-122-2/+55
| | | | | | | | API settings: - api.enabled - api.secret The API settings will be initialized (and the secret generated) with an update method.
* Add a persistent 'shorturl' key to all linksArthurHoaro2016-12-126-48/+59
| | | | | | | All existing link will keep their permalinks. New links will have smallhash generated with date+id. The purpose of this is to avoid collision between links due to their creation date.
* Unit Test for the new ID systemArthurHoaro2016-12-128-95/+306
|
* Merge pull request #691 from ArthurHoaro/plugins/no-md-feedArthur2016-12-011-4/+25
|\ | | | | Markdown: fixes feed rendering with nomarkdown tag
| * Markdown: fixes feed rendering with nomarkdown tagArthurHoaro2016-11-221-4/+25
| | | | | | | | | | | | | | | | | | | | | | * make sure we match exactly `nomarkdown` tag * pass the whole link data to stripNoMarkdownTag() to: * strip the noMD tag in taglist (array) * strip the tag in tags (string) Fixes #689 tmp
* | .htaccess files: support Apache 2.4+ syntaxArthurHoaro2016-11-081-2/+13
|/ | | | | | | | | | | | | | | If `mod_version` is enabled, the previous syntax will apply for Apache <2.4. If not, the new syntax is used by default. Fixes #676 `mod_version` identifier is `version_module` across all Apache versions. See: * https://httpd.apache.org/docs/current/mod/mod_version.html * https://httpd.apache.org/docs/2.2/mod/mod_version.html * https://serverfault.com/questions/733910/how-do-i-load-mod-version-only-if-it-isnt-built-in-to-apache Note that version_module comes built-in with Debian (and derivatives) Apache2 packages, see https://wiki.debian.org/Apache/PackagingFor24
* Fix an issue with links not being reversed in code blocksArthurHoaro2016-10-223-0/+61
| | | | | | Fixes #672 + Markdown to HTML unit test
* Merge pull request #673 from virtualtam/cleanup/linkdbVirtualTam2016-10-212-5/+5
|\ | | | | LinkDB: code cleanup
| * LinkDB: explicit method visibilityVirtualTam2016-10-201-1/+1
| | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
| * LinkDB: update datastore method namesVirtualTam2016-10-201-4/+4
| | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
| * LinkDB: do not prefix privates with an underscoreVirtualTam2016-10-201-2/+2
| | | | | | | | | | | | Relates to #95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | Merge pull request #665 from ArthurHoaro/fix/feed-hashtagsVirtualTam2016-10-201-0/+1
|\ \ | |/ |/| Fix hashtag links in Feeds
| * Fix hashtags links in FeedsArthurHoaro2016-10-201-0/+1
| | | | | | | | Make the hashtag link absolute in feeds to work properly in RSS syndication tools.
* | Minor code cleanup: PHPDoc, spelling, unused variables, etc.ArthurHoaro2016-10-201-1/+1
|/
* Merge pull request #651 from ArthurHoaro/plugin-isso2Arthur2016-10-181-0/+136
|\ | | | | Isso comments plugin
| * Isso comments pluginArthurHoaro2016-10-171-0/+136
| | | | | | | | Use Isso client to let visitors comments on permalinks
* | Merge pull request #662 from virtualtam/fix/feed/self-linkVirtualTam2016-10-171-0/+33
|\ \ | |/ |/| Fix: return the proper value for the "self" feed attribute
| * Fix: return the proper value for the "self" feed attributeVirtualTam2016-10-161-0/+33
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/shaarli/Shaarli/issues/629 Closes https://github.com/shaarli/Shaarli/pull/630 Note: you might need to empty the "pagecache" directory for the fix to be taken into account Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | New init function for plugins, supports errors reportingArthurHoaro2016-10-142-4/+42
|/ | | | | | | | All plugins can optionally add an init function named `pluginname_init()` which is called when the plugin is loaded. This function is aware of the config, and can return initialization errors, which are displayed in the header template. Note that the previous error system hack no longer work.
* Merge pull request #654 from teromene/archive-org-no-internalVirtualTam2016-10-131-4/+98
|\ | | | | | | | | Archive.org plugin: do not propose archival of private notes Fixes #637
| * Archive.org plugin: do not propose archival of private notesTeromene2016-10-131-4/+98
| | | | | | | | Fixes #637
* | Merge pull request #622 from ArthurHoaro/update-dateArthur2016-10-122-5/+15
|\ \ | | | | | | Save link update dates and render it in templates and feeds
| * | Set updated date for items in feedsArthurHoaro2016-08-032-5/+15
| | | | | | | | | | | | | | | RSS doesn't support updated date for items, so we use the ATOM extension. Updated dates also bump the global update
* | | Merge pull request #623 from ArthurHoaro/security/reverse-proxy-banArthur2016-10-121-0/+58
|\ \ \ | |_|/ |/| | Add trusted IPs in config and try to ban forwarded IP on failed login
| * | Add trusted IPs in config and try to ban forwarded IP on failed loginArthurHoaro2016-08-031-0/+58
| |/ | | | | | | | | | | | | | | * Add a new settings (which needs to be manually set): `security.trusted_proxies` * On login failure, if the `REMOTE_ADDR` is in the trusted proxies, try to retrieve the forwarded IP in headers. * If found, the client address is added in ipbans, else we do nothing. Fixes #409
* | Merge pull request #619 from ArthurHoaro/plugins/param-descVirtualTam2016-08-133-9/+17
|\ \ | | | | | | Add a description to plugin parameters
| * | Parse plugin parameters description with the PluginManagerArthurHoaro2016-08-023-9/+17
| | | | | | | | | | | | | | | | | | Plugin parameter can contain a description in their meta file under the key: parameter.<param_name>="<description>"
* | | Fix: add missing final newlines, untabify textVirtualTam2016-08-132-2/+2
| | | | | | | | | | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | | Fix: ensure Internet Explorer bookmark dumps can be importedVirtualTam2016-08-122-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/607 Modifications: - [application][tests] NetscapeBookmarkUtils: more permissive doctype detection The IE bookmark exports contain extra escape sequences, which can be observed by binary comparison of the reference input data used in tests: $ cmp -b -l -n 8 netscape_basic.htm internet_explorer_encoding.htm 1 74 < 357 M-o 2 41 ! 273 M-; 3 104 D 277 M-? 4 117 O 74 < 5 103 C 41 ! 6 124 T 104 D 7 131 Y 117 O 8 120 P 103 C Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | | Refactor bookmark import using a generic Netscape parserVirtualTam2016-08-107-2/+580
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to #607 Relates to #608 Relates to #493 (abandoned) Additions: - use Composer's autoload to load 3rd-party dependencies under vendor/ Modifications: - [import] replace the current parser with a generic, stable parser - move code to application/NetscapeBookmarkUtils - improve status report after parsing - [router] use the same endpoint for both bookmark upload and import dialog - [template] update bookmark import options - allow adding tags to all imported links - allow selecting the visibility (privacy) of imported links - [tests] ensure bookmarks are properly parsed and imported in the LinkDB - reuse reference input from the parser's test data See: - https://github.com/shaarli/netscape-bookmark-parser - https://getcomposer.org/doc/01-basic-usage.md#autoloading Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | | Initialize a translation functionArthurHoaro2016-08-071-0/+41
| |/ |/| | | | | It matches the API of ngettext().
* | Merge pull request #621 from ArthurHoaro/hotfix/update-escape-configVirtualTam2016-08-021-0/+24
|\ \ | | | | | | Fix update method escapeUnescapedConfig
| * | Fix update method escapeUnescapedConfigArthurHoaro2016-08-021-0/+24
| |/ | | | | | | | | | | | | * Actually run it * unit tests Fixes #611