Skip to content

Commit e74503e

Browse files
committed
Upgrade to 2022-07-31a Igor
1 parent d19fe64 commit e74503e

File tree

814 files changed

+24731
-9799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

814 files changed

+24731
-9799
lines changed

dokuwiki/SECURITY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Security Policy
2+
3+
Security vulnerabilities can be reported for the current stable release (branch `stable`) and the `master` branch.
4+
5+
We try to fix vulnerabilites as fast as possible, but please keep in mind that this is a project run by volunteers. Depending on the severity we may release hotfixes for the current stable release or may simply incorporate the fix in the next proper release.
6+
7+
**This policy only applies to DokuWiki and the bundled plugins. Do not report issues about 3rd party plugins here.**
8+
9+
## Reporting a Vulnerability
10+
11+
You have multiple options on reporting vulnerabilities
12+
13+
* Use [huntr.dev](https://www.huntr.dev/bounties/disclose/?target=https%3A%2F%2Fgithub.com%2Fsplitbrain%2Fdokuwiki%2F)
14+
* Send an e-mail to [Andi](mailto:[email protected])
15+
* Open a [Github Issue](https://github.com/splitbrain/dokuwiki/issues)
16+
* Send a mail to the [Mailing List](https://www.dokuwiki.org/mailinglist)

dokuwiki/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2020-07-29a "Hogfather"
1+
2022-07-31a "Igor"

dokuwiki/bin/dwpage.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,27 @@ protected function setup(Options $options) {
118118
true,
119119
'unlock'
120120
);
121+
122+
/* gmeta command */
123+
$options->registerCommand(
124+
'getmeta',
125+
'Prints metadata value for a page to stdout.'
126+
);
127+
$options->registerArgument(
128+
'wikipage',
129+
'The wiki page to get the metadata for',
130+
true,
131+
'getmeta'
132+
);
133+
$options->registerArgument(
134+
'key',
135+
'The name of the metadata item to be retrieved.' . "\n" .
136+
'If empty, an array of all the metadata items is returned.' ."\n" .
137+
'For retrieving items that are stored in sub-arrays, separate the ' .
138+
'keys of the different levels by spaces, in quotes, eg "date modified".',
139+
false,
140+
'getmeta'
141+
);
121142
}
122143

123144
/**
@@ -160,6 +181,13 @@ protected function main(Options $options) {
160181
$this->clearLock($wiki_id);
161182
$this->success("$wiki_id unlocked");
162183
break;
184+
case 'getmeta':
185+
$wiki_id = array_shift($args);
186+
$key = trim(array_shift($args));
187+
$meta = p_get_metadata($wiki_id, $key, METADATA_RENDER_UNLIMITED);
188+
echo trim(json_encode($meta, JSON_PRETTY_PRINT));
189+
echo "\n";
190+
break;
163191
default:
164192
echo $options->help();
165193
}

dokuwiki/bin/wantedpages.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use dokuwiki\Utf8\Sort;
5+
use dokuwiki\File\PageResolver;
46
use splitbrain\phpcli\CLI;
57
use splitbrain\phpcli\Options;
68

@@ -77,13 +79,13 @@ protected function main(Options $options) {
7779
foreach($this->getPages($startdir) as $page) {
7880
$this->internalLinks($page);
7981
}
80-
ksort($this->result);
82+
Sort::ksort($this->result);
8183
foreach($this->result as $main => $subs) {
8284
if($this->skip) {
8385
print "$main\n";
8486
} else {
8587
$subs = array_unique($subs);
86-
sort($subs);
88+
Sort::sort($subs);
8789
foreach($subs as $sub) {
8890
printf("%-40s %s\n", $main, $sub);
8991
}
@@ -160,14 +162,12 @@ protected function getPages($dir) {
160162
protected function internalLinks($page) {
161163
global $conf;
162164
$instructions = p_get_instructions(file_get_contents($page['file']));
163-
$cns = getNS($page['id']);
164-
$exists = false;
165+
$resolver = new PageResolver($page['id']);
165166
$pid = $page['id'];
166167
foreach($instructions as $ins) {
167168
if($ins[0] == 'internallink' || ($conf['camelcase'] && $ins[0] == 'camelcaselink')) {
168-
$mid = $ins[1][0];
169-
resolve_pageid($cns, $mid, $exists);
170-
if(!$exists) {
169+
$mid = $resolver->resolveId($ins[1][0]);
170+
if(!page_exists($mid)) {
171171
list($mid) = explode('#', $mid); //record pages without hashes
172172

173173
if($this->sort == 'origin') {

dokuwiki/composer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "splitbrain/dokuwiki",
3+
"description": "DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database",
4+
"homepage": "https://www.dokuwiki.org",
5+
"type": "project",
6+
"license": "GPL v2",
7+
"require": {
8+
"php": ">=7.2",
9+
"ext-json": "*",
10+
"splitbrain/php-archive": "~1.0",
11+
"phpseclib/phpseclib": "~2.0",
12+
"simplepie/simplepie": "^1.4",
13+
"geshi/geshi": "dev-master as 1.0.x-dev",
14+
"openpsa/universalfeedcreator": "^1.8",
15+
"aziraphale/email-address-validator": "^2",
16+
"marcusschwarz/lesserphp": "^0.5.1",
17+
"splitbrain/php-cli": "^1.1",
18+
"splitbrain/slika": "^1.0",
19+
"kissifrot/php-ixr": "^1.8"
20+
},
21+
"config": {
22+
"platform": {
23+
"php": "7.2"
24+
}
25+
},
26+
"suggest": {
27+
"ext-mbstring": "The mbstring extension is highly reccomended to speed up all UTF-8 handling",
28+
"ext-intl": "The intl extension allows for better locale specific sorting",
29+
"squizlabs/php_codesniffer": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
30+
"phpunit/phpunit": "Allows automated tests to be run without system-wide install (only version 4-7 are supported)."
31+
},
32+
"prefer-stable": true
33+
}

0 commit comments

Comments
 (0)