Commit Graph

145 Commits

Author SHA1 Message Date
Andreas Gohr d4f83172d9 code style: line breaks 2023-08-31 22:44:40 +02:00
Andreas Gohr 26dfc2323f Rector to rename print to echo calls 2023-08-31 22:00:27 +02:00
Gerrit Uitslag 220897ae26 update urls and simplify regexp 2023-08-31 00:59:34 +02:00
Gerrit Uitslag ff84abad8a reformatting at top level 2023-08-31 00:55:36 +02:00
Andreas Gohr 0f2c316ab3 comment fix in install.php 2023-08-30 14:51:30 +02:00
Andreas Gohr b1f206e1d4 Apply rector fixes to bin and toplevel 2023-08-30 14:48:22 +02:00
Andreas Gohr c49393f5a4 increase required PHP version to 7.4 2023-06-09 21:10:11 +02:00
Andreas Gohr 36a1a8807f CodeStyle: fix line length issue in installer 2022-04-28 09:20:06 +02:00
jpedryc 2cb06bbdd8 Changed username validation (to func cleanID) during installation 2022-02-15 23:17:04 +01:00
jpedryc db5812548d Styling install.php 2022-02-15 22:48:45 +01:00
Damien Regad ee4f28e375 Fix warning in install.php on PHP 8
Warning: Undefined array key "pop" in install.php on line 427

In PHP 8, attempting to read an undefined array key throws a warning
instead of a notice as in earlier versions [1].

[1]: https://www.php.net/manual/en/migration80.incompatible.php
2021-01-26 12:06:19 +01:00
Martijn Ras 5484014bf7 Fix for Remove random_compat, no longer needed #3262 2021-01-08 00:12:41 +01:00
Andreas Gohr 670dc13d7e Installer: check for XML parser method. fixes #3207 2020-07-27 12:34:16 +02:00
ms101 722372bd8e fixed comment smd5->bcrypt 2020-06-09 18:16:25 -06:00
ms101 267bbbca31 changed hash algo in install.php from smd5 to bcrypt 2020-06-08 14:29:09 -06:00
Myron Turner 3f6872b1fc
Checks for PHP mail in install.php and warns if mail used after install (#3056)
* Checks for PHP mail in install.php and warns if mail used after install.

* fixed spacing in instal.php

* Reconfigured warning message and code for PHP mail not existing or disabled. Removed the substitute mail function in inc/compatibility.php

* fixed some spacing errors in install.php

* Adds warning to error_log when call is made to unavailable PHP mail function and posts the warning to browser top if current user is admin.

* adds newline at end of compatibility.php and $lang global to Mailer.class.php

* Changes to handling of msg and `return false` as suggested by @phy25

* Removed tab from lilne 719

* removed additional tabs from Mailer.class.php

* Update inc/Mailer.class.php

removes unnecessary object

* Update inc/Mailer.class.php

changed msg styling for msg_managers_only warning for no PHP mail function

* Update inc/Mailer.class.php

* Update inc/Mailer.class.php
2020-05-16 23:24:21 -04:00
Andreas Gohr 47350e5c85
Merge pull request #2993 from splitbrain/issue1892
Add random_bytes check in installer
2020-03-04 18:18:15 +01:00
Phy 5930516826
Remove obsolete attributes at <script> tag
Nowadays it is not necessary to specify "type" or "charset" attribute at <script> tag:

1. "type" attribute defaults to "application/javascript", so there is no need to specify that. The recent value "text/javascript" is obsolete in favor of the default "application/javascript", as stated e.g. here: https://www.iana.org/assignments/media-types/media-types.xhtml#text

2. "charset" attribute of the <script> tag defaults to encoding be the same as the encoding of the script element's node document. As DokuWiki's default encoding is "utf-8", there is no need to specify this encoding in external resources. See: https://html.spec.whatwg.org/multipage/scripting.html#the-script-element

Manual merging, closes #2921.

Co-Authored-By: petrkajzar <58340153+petrkajzar@users.noreply.github.com>
2020-03-02 10:03:06 -05:00
Phy 387250efa9
Add random_bytes check in installer
Fixes #1892. This will be triggered by:

- PHP 7+: "If an appropriate source of randomness cannot be found, an Exception will be thrown"
- paragonie/random_compat: PHP 5.6 support will fail if urandom is not readable
2020-02-28 23:36:35 -05:00
Andreas Gohr c823026dc9
Merge pull request #2857 from splitbrain/issue2845
use inline template instead of .dist file to populate users.auth.php
2019-10-15 14:34:31 +02:00
Phy a672ef7566 use inline template instead of .dist file to populate users.auth.php
users.auth.php is the only file in DokuWiki that is generated by using existing .dist file, instead of inline templates in install.php. This may cause problem when install.php is being run to create animal wiki in farm mode, because in this case DOKU_CONF may have no files at all, so install cannot populate users.auth.php properly. This closes #2845, which may be a result of this behavior - without proper comments at the beginning of the file, once the last authplain user is removed (if users has other auth backend as a proxy of authplain), the whole file will get removed, which causes fatal error.
2019-09-13 22:27:21 -04:00
Andreas Gohr abc9c0d217 Merge branch 'master' into psr2
* master: (22 commits)
  Support "local" subdir when listing the smiley directory
  fix zero ID/NS issue with page_findnearest
  add ID/NS = '0' test against page_findnearest
  fix zero value issue with metadata indexer
  add key/value = '0' test to metadata indexer
  fix zero ID issue with linkwiz and search indexer
  fix zero ID issue with wl() and getID()
  add $ID = '0' test against wl() and getID()
  cookie.js when setValue‘s value parameter is false delete entry
  install.php: respect useacl=0 choice, fixes #2576
  cookie.js add def parameter to getValue()
  cookie.js convert value type to string
  set_doku_pref bugfix, closes #2721
  more definition tests of doku_pref, for #1129
  add tests for get/set_doku_pref #2721
  fix Windows tests for #2702
  use absolute URL in index.php when redirecting to doku.php, fixes #2706
  Adding "recursive_groups" setting for authad-plugin in configuration-manager
  Fix notices when using dw CLI
  Fix issue #2396
  ...
2019-03-30 22:08:54 +01:00
Phy b9ab8e4f0a install.php: respect useacl=0 choice, fixes #2576 2019-03-13 13:54:14 -04:00
Andreas Gohr c3cc6e05f5 PSR2 adjustments for the PassHash class
I opted for ignoring the camel case funtion check not because the public hash_*
methods are widely used but because I find this style actually cleaner
in this case where the method name is auto-built from the hash type
name.
2019-03-06 20:22:43 +01:00
Andreas Gohr 272a98e22f Merge branch 'master' into psr2
* master:
  fixed tests for chunked encoding
  Update PHP logo URL to HTTPS
  Bump updateVersion
  fix draft recovering
  updated php-archive lib. fixes #2361
  translation update
  translation update
  Add simple catch-all to left install.php div
2018-05-07 23:01:32 +02:00
Andreas Gohr 64159a61e9 line lengths shortened
This makes sure all files use line lenghts shorter than 120 characters.

This is a quick fix. It might not always be the nicest change.
2018-04-27 19:07:43 +02:00
L. Ivanovich Harrison 7ac1baa005
Add simple catch-all to left install.php div
Background: I was trying to install DokuWiki in my chrooted OpenBSD webserver. The install seemed funky (generated config but not ACLs), and the installer page, instead of even showing any errors, was just blank after submitting initial parameters. Long story short, I edited install.php to approximately this effect, and finally got a visible error, which let me find out that I needed to create $CHROOT/dev/{a,u,s,}random. I would have found that out a lot sooner and torn out a lot less of my beautiful hair if something like this were already in place. After all, the installation phase is where one expects many edge cases and whatnot. Would help newcomers with strange environments to make more actionable forum posts crying for help. Please consider.
2018-04-24 02:35:41 -07:00
Michael Große fcfe300b61
Remove installer conf/dokuwiki.php hash check
This check was useful in ages past, when there was no conf/local.php

However, nowadays it causes the installer to fail with the snapshot
version of DokuWiki and since we now have a dedicated local.php, it has
become obsolete.
2018-03-21 14:34:46 +01:00
Andreas Gohr ac251797d3 try to display an error when installer is run without php
When a server has no PHP support enabled, it will either prompt to
download a PHP file or may display it as HTML instead. When a user tries
to run install.php with a server that does the latter, they will see
some weird garbage with the browser trying to interpret raw PHP as HTML.
This pathc adds a warning at the top, telling the user what is going on.
2018-02-14 14:09:08 +01:00
DeathCamel57 3cd8376204 Make security.png more descriptive
Access attempts to security.png are normally denied, so the name of the file will be more self-descriptive
2017-12-06 00:15:21 -05:00
Phy 65cc1598e0 Replace htmlspecialchars to hsc in core 2017-08-01 18:03:01 +08:00
Andreas Gohr 75ce4e03a1 remove magic quote handling 2017-03-31 09:54:07 +02:00
Andreas Gohr 3476bb81a3 increase minimum version requirement to PHP 5.6 2017-03-31 09:29:40 +02:00
Yousong Zhou 02bca5d42d Fix calling undefined function random_int() when doing install.php
Otherwise the it will fail with the following error:

	2017/02/20 14:34:57 [error] 16242#0: *59 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Call to undefined function random_int() in /var/www/dokuwiki/inc/PassHash.class.php on line 630" while reading response header from upstream, client: 172.18.35.245, server: _, request: "POST /dokuwiki/install.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "10.5.234.170", referrer: "http://10.5.234.170/dokuwiki/install.php"

Fixes #1852
2017-02-20 18:41:08 +01:00
Guy Brand 2f7c97b3eb Release preparation 2017-02-19 14:07:03 +01:00
Guy Brand c8574e7db0 Release preparation 2016-06-26 13:19:27 +02:00
Anders Sandblad 59752844d1 Fixed broken links to php.net and redirecting pages to php.net 2016-06-14 08:48:12 +02:00
Guy Brand a060d9973e Release preparation 2015-08-10 10:01:56 +02:00
Anika Henke ae614416a5 changed all input type=submit buttons to button type=submit button for better stylability 2015-07-12 19:05:43 +01:00
Andreas Gohr 79e7937762 Remove error supression for file_exists()
In an older version of PHP a file_exists() call would issue a warning
when the file did not exist. This was fixed in later PHP releases. Since
we require PHP 5.3 now, there's no need to supress any error here
anymore. This might even give a minor performance boost.
2015-01-07 10:47:45 +01:00
Gerrit Uitslag 8702de7f7e Merge remote-tracking branch 'origin/master' into scrutinizerissues
Conflicts:
	inc/media.php
	inc/plugin.php
	inc/template.php
	lib/plugins/authplain/_test/escaping.test.php
	lib/plugins/syntax.php
2014-12-09 17:26:28 +01:00
Andreas Gohr 001d05eda1 new PHP minimum requirement is now 5.3.3
that's the version in Debian old stable
2014-10-14 21:33:23 +02:00
Gerrit Uitslag 253d4b48ec more PHPDocs, unused var, small bit code reformatting 2014-10-01 15:32:05 +02:00
Andreas Gohr 57271d078b release preparations 2014-09-29 20:15:27 +02:00
Andreas Gohr 2613efa18d allow config presets with installer
this adds the ability to place a install.conf file next to the
install.php which contains additional config options to be written to
conf/local.php on completion of the installer. The install.conf is
automatically deleted then.

This is useful for automated DokuWiki installers or downloaders that
take care of downloading DokuWiki and then drop the user in the default
install dialog for initial setup. These tools may set up host specific
things options like rewrites, image magic path or file permission
settings in this preset.
2014-06-22 00:00:41 +02:00
Andreas Gohr 7f41344085 check mbstring function overloading in installer. closes #736 2014-05-24 19:58:29 +02:00
Guy Brand 75930869dd Release preparation 2014-05-05 22:48:47 +02:00
Guy Brand 8c4759c9d3 Release preparation 2013-12-08 18:03:32 +01:00
Guy Brand 14b3007921 Release preparation 2013-11-18 15:28:28 +01:00
Anika Henke ab9346edc1 swapped logic for allowing/disabling registration in installer 2013-11-17 20:53:46 +00:00