1
0
Commit Graph

5741 Commits

Author SHA1 Message Date
5765d1a779 Avoid undefined index notices, see https://github.com/s9y/Serendipity/issues/642 2019-10-13 18:21:18 +02:00
f4d07960bb Assume uninitialized constant PLUGIN_LINK_SPARTACUS.
Fixes #638.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 17:35:58 +02:00
9b6a8f6c87 Force positive values for fetchLimits.
The number of entries shown onm the title
page and in the feed has to be at least "1",
as s9y can't cope with "0" or negative
values (and it shouldn't).

May be related to #636.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 17:24:17 +02:00
722a4ef4c4 Fix a typo in a comment.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 17:20:45 +02:00
00832cbca8 Add news item for "Fix mangling of mails".
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 13:39:36 +02:00
9867d70fac Fix mangling of auto-generated mails.
s9y will encode the body of its auto-generated
mails as quoted-printable when imap_8bit() is
available. imap_8bit() will use "\r\n" as
linebreaks as mandated for SMTP transfer.
The result will be transmitted via PHP's
mail() function, using direct SMTP on
Windows and piping it to a MTA on Unix.

Most MTAs will cope just fine with those
linebreaks, while qmail will not; it will
replace all "\n" linebreaks with "\r\n",
so we get "\r\r\n" in our case. We can't
"fix" qmail (as its maintainer, if there
even is one, does not consider this
behaviour wrong), but we can replace the
line endings we get from imap_8bit().

The fix does work with qmail and Exim and
should work with sendmail and Postfix and
other MTAs, too. It may break sending
mail on Windows (i.e. lose all linebreaks),
but I think that's acceptable, as we'll
have more qmail installation than Windows
servers out there.

A workaround could be to set
serendipity['forceBase64']=true in
serendipity_config_local.inc.php, but I'd
prefer this fix.

Fixes #644.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-10-13 13:15:27 +02:00
f3341f19b4 document rotating images and figcaption fix 2019-10-10 23:44:13 +02:00
27fd525706 fix: rotate image did not rotate all thumbnails 2019-10-10 23:41:52 +02:00
b614ed5d07 Fix: Stop ckeditor from removing figures and figcaptions 2019-10-09 18:10:21 +02:00
e8b8be0342 [TASK] Prevents PHP warnings with type differences on $_REQUEST['serendipity']
refs #642
2019-10-07 17:03:33 +02:00
5241f2d6ab Document #639 2019-09-28 23:07:13 +02:00
fa8e77c130 Escape category images to avoid backend XSS 2019-09-28 23:09:30 +02:00
464c1319ad Fix sidebar not displayed in BS4 theme 2019-09-20 21:53:58 +02:00
23eb937793 Fix typo 2019-09-20 19:31:58 +02:00
7ab1cf9091 [BUGFIX] [SECURITY] Fixes only logging to .log and.txt filetype extensions 2019-09-17 10:50:28 +02:00
5ccaa9a855 [CLEANUP] Changes release dates like before 2019-09-17 10:50:00 +02:00
febbb55371 [CLEANUP] Code formatting 2019-09-17 10:49:37 +02:00
a8344876e6 [BUGFIX] Fixes {$save_error} not showing when saving plugin API configuration 2019-09-17 10:49:22 +02:00
6737384bbf Adds 'vagrant' to gitignore for local development 2019-09-09 11:19:31 +02:00
f86fd35c13 document #632 2019-09-06 10:48:22 +02:00
07a241798d With MySQL use cast(okey as unsigned) instead of cast(okey as integer)
The autologin ("Save information") functionality in 2.3.1 is broken since

    commit 52a41b37d5
    CommitDate: Fri Mar 23 18:01:32 2018 +0100

	Rework autologin to use a token approach

Although a cookie serendipity[author_autologintoken] with correct
expiration (one month) which random data content is present as value
in the serendipity_options table with name autologin_Username and
correct timestamp as okey and that is found with manually executing
the SQL statement

  SELECT name, value, okey FROM serendipity_options WHERE name = 'autologin_Username' AND okey > 1565801743 LIMIT 1

like done in include/functions_config.inc.php
serendipity_checkAutologin(), the login is forgotten after 30 minutes
or so. That was not the case with 2.1.5 where the login was valid for
weeks.

Of

    if (stristr($serendipity['dbType'], 'sqlite')) {
        $cast = "okey";
    } else {
        // Adds explicits casting for mysql, postgresql and others.
        $cast = "cast(okey as integer)";
    }

from which $cast then is used in the SQL statement instead of a plain
okey; when doing that manually with

  SELECT name, value, okey FROM serendipity_options WHERE name = 'autologin_Username' AND cast(okey as integer) > 1565801743 LIMIT 1

it produces the MySQL error

  #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'integer) > 1565801743 LIMIT 1' at line 1

This also with $serendipity['dbType'] = 'mysqli' for the above code.

Indeed, cast(okey as integer) is invalid in MySQL and should be
cast(okey as unsigned) instead which then also works manually, see
https://stackoverflow.com/a/12127022 and
https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast

Same in serendipity_issueAutologin().

Changing those two places accordingly resolves the autologin not
persistent problem.

Additionally, inspecting the serendipity_options table revealed loads
of old serendipity[author_authorinformation] cookie information that
was never deleted in serendipity_issueAutologin() with the

  OR (okey LIKE 'l_%' AND $cast < " . (time() - 1814400) . ")")

expression producing a MySQL error. This has to be done manually
once as also 2.3.1 will not delete it anymore.
2019-09-06 10:48:36 +02:00
ecd3c9fa0b Revert "Fix pagination for "stable archives" in themes."
This reverts commit d9b3333556.

With this - now reverted - commit, the prev/next
arrows in pagination were swapped because they
were the wrong way around. Unfortunately, later on,
in ebb852d400, the
root cause was fixes by "unswapping" the prev/next
links in core, so now the pagination arrows were
... eh ... wrongly swapped. So this commit has to
be reverted.

Should fix #625 for good this time.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-24 08:39:13 +02:00
dd46e39884 Release 2.3.1
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-21 07:38:04 +02:00
573fefc8e2 Fix recode.sh - only copy language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 12:19:38 +02:00
b944d76ee7 Add new language constant to all language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 12:15:22 +02:00
9ae7ec779d Add plugin update notifier to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 10:48:59 +02:00
2d7c9a0db2 [checklang] Don't normalize languages to lc.
"serendipity_lang_pt_PT.inc.php" is mixed
case and won't be found if languages are
normalized to lowercase.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:48:48 +02:00
75a6309fe3 lang DE: Remove duplicates, add missing.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:30:13 +02:00
c32b692b1b lang EN: Remove duplicates, add missing.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:23:55 +02:00
f85608e3ce [plugin_categories] Add description constant.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:14:20 +02:00
77905d991d Fix typo.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:08:32 +02:00
f8f40d27a4 Add language file checker.
This checker will find duplicate, missing and
superfluous constants in Serendipity's language
files.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-18 01:04:05 +02:00
0805014761 [event_spartacus] Fix upgrade counter.
The plugin name was derived from its
install path - but bundled sidebar and
event plugins may share a path. So use
the name instead (and strip the instance
hash from it).

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 18:14:26 +02:00
3730e77ddf Bump version, add Changelog entry.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 13:56:43 +02:00
3d0410bacd plugin_lang.php: Check additional_plugins, too.
If you have the additional_plugins repo handy,
you can just change the base path to check all
that plugins, too.

We shouldn't forget to check the UTF-8
directories.

And we just have to catch all, even fatal,
errors, due to missing function dependencies.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 13:33:14 +02:00
4327c432a5 event_entryproperties: Add missing language constant.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
d2ad092763 plugin_lang.php: Make output more readable.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
9c66269fce addlang.sh: Move input to backup after run.
And check for input file before starting.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
770e0eb2fd Move new constant to end of language files.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
b2aef47e05 [event_spamblock] Add ChangeLog.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 12:59:54 +02:00
8941fe6563 [event_spamblock] Don't overwrite "moderate" flag.
Unconditionally setting $serendipity['csuccess']
to 'true' will override a "moderate" flag set by
another (spamblock) plugin.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 04:07:30 +02:00
cee38e55ab Merge pull request #629 from th-h/thh-ml-multi
Fix media library (mass) delete, enhance i18n.
2019-08-17 01:46:30 +02:00
0b58fe42f2 Add ML changes to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 01:43:00 +02:00
f8110dbe86 I18n for multimove.
* Add MEDIA_DIRECTORY_MOVE.
* Change German translation of "Move" to
  "Verschieben".
2019-08-17 01:38:08 +02:00
12bb9c0cc0 Fix media library (mass) delete.
Fixes #619.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 01:36:51 +02:00
6253c03ad9 Merge pull request #628 from th-h/thh-pagination
Fix prev/next page links for stable archives.
2019-08-17 00:55:32 +02:00
ebb852d400 Fix prev/next page links for stable archives.
We shouldn't swap prev/next links for archive
pages. With stable archives, the title page is
the last page of the archive, not the first, so
all other pages are "previos", and we should
display it like that.

That may seem counterintuitive at first, but
otherwise archive page directions and pagination
directions don't match (see bulletproof), and we
shouldn't count archive pages differently from
the URL. With the current code, page 100 of 100
archive pages would be shown in footer_info as
page 1, page 99 as page 2, and that doesn't make
sense either.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 00:52:19 +02:00
42d57bb1c2 Add pagination fixes to NEWS.
Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 00:11:16 +02:00
2f9b8e23b8 Merge pull request #627 from th-h/thh-pagination
Fix pagination for "stable archives" in themes.
2019-08-17 00:03:42 +02:00
d9b3333556 Fix pagination for "stable archives" in themes.
Timeline and Bulletproof have pagination.
Both need to swap the prev/next links for
stable archives, as the sorting order has
been reversed.

Signed-off-by: Thomas Hochstein <thh@inter.net>
2019-08-17 00:01:57 +02:00