Giter Site home page Giter Site logo

moinwiki / moin-1.9 Goto Github PK

View Code? Open in Web Editor NEW
138.0 138.0 48.0 78.35 MB

MoinMoin Wiki (1.9, also: 1.5a ... 1.8), stable, for production wikis

Home Page: https://moinmo.in/

License: Other

Makefile 0.07% Python 71.61% JavaScript 15.68% CSS 1.12% HTML 4.94% ColdFusion 1.06% PHP 1.07% Perl 0.31% Lasso 0.18% Java 3.57% Shell 0.01% Raku 0.01% Classic ASP 0.32% ASP.NET 0.06%
python python-2 wiki wiki-engine

moin-1.9's People

Contributors

0x524a4b avatar andydawkins avatar cz4rny avatar dimazest avatar esyr avatar fgsch avatar florianfesti avatar fpletz avatar geirha avatar geraldcombs avatar jomeier avatar knowak avatar matthijskooijman avatar mmihaljevic avatar punycode avatar raphaelbossek avatar reimarbauer avatar rogerhaase avatar ronnypfannschmidt avatar thomasah avatar thomaswaldmann avatar uiopaubo avatar voxmea avatar xiaq avatar xoraxax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moin-1.9's Issues

HTML shown on forbidden and surge protection pages

Behaviour

I noticed while browsing https://wiki.debian.org/ (powered by MoinMoin) that <p> tags would be displayed in the message for pages which are Forbidden (i.e. 403 response). Sample MoinMoin response (testing on local by blacklisting my ip):

    $ ./wikiserver.py &>/dev/null &
    $ curl localhost:8080
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <title>403 Forbidden</title>
    <h1>Forbidden</h1>
    <p>&lt;p&gt;You are not allowed to access this!&lt;/p&gt;</p>

Note the escaped tags in the last line. When I started browsing the code it looks like there's a similar issue for the SurgeProtection page (tested locally by just forcing this to be raised on each page):

    $ curl localhost:8080
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <title>503 Surge protection</title>
    <h1>Surge protection</h1>
    <p>&lt;strong&gt;Warning:&lt;/strong&gt;&lt;p&gt;You triggered the wiki's surge protection by doing too many requests in a short time.&lt;/p&gt;&lt;p&gt;Please make a short break reading the stuff you already got.&lt;/p&gt;&lt;p&gt;When you restart doing requests AFTER that, slow down or you might get locked out for a longer time!&lt;/p&gt;</p>

Cause

This appears to be caused by MoinMoin.Support.werkzeug.exceptions.HTTPException.get_description which escapes the exception's escape string. Note that this also wraps the description in <p></p> tags itself.

Proposed Solution

Assuming this needs addressing, the easiest solution I see is to simply strip all tags from each exception's description. If this is acceptable I'd happily get a PR up for it

Why are some pages displaced incorrectly?

Hi there,

I have a Moin 1.9.11 with pypy2.7
Strangely enough some pages are displayed all right
image

However when I click on a page (say InvisiblesLab/SafetyRules) I get something weird like ...

image

with a version of the page appearing at the bottom?

a) Is it a permission issue?

b) The mod_wsgi not working properly?

Many thanks

Dr Roberto Scipioni
Research Computing Support Engineer
University of Sussex Mathematical and Physical Sciences School

add_msg issues

WantedPages / AbandonedPages:

2020-09-02 00:35:51,055 WARNING MoinMoin.theme:1598 Calling add_msg() after send_title(): no message can be added.
2020-09-02 00:35:51,086 INFO MoinMoin.theme:1599 Call stack for add_msg():
  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1332, in send_page
    start_line=pi['lines'])

  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1432, in send_page_content
    self.execute(request, parser, code)

  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1457, in execute
    exec code

  File "WantedPages", line 27, in <module>

  File "/home/user/w/moin-1.9/MoinMoin/formatter/__init__.py", line 312, in macro
    return macro_obj.execute(name, args)

  File "/home/user/w/moin-1.9/MoinMoin/macro/__init__.py", line 129, in execute
    return execute(self, args)

  File "/home/user/w/moin-1.9/MoinMoin/macro/__init__.py", line 114, in <lambda>
    _self.request, call, _args, [_self])

  File "/home/user/w/moin-1.9/MoinMoin/wikiutil.py", line 1973, in invoke_extension_function
    return function(*fixed_args, **kwargs)

  File "/home/user/w/moin-1.9/MoinMoin/macro/WantedPages.py", line 47, in macro_WantedPages
    links = page.getPageLinks(request)

  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1607, in getPageLinks
    links = self.parsePageLinks(request)

  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1652, in parsePageLinks
    page.send_page(content_only=1)

  File "/home/user/w/moin-1.9/MoinMoin/Page.py", line 1201, in send_page
    request.theme.add_msg(_('The backed up content of this page is deprecated and will rank lower in search results!'), "warning")

  File "/home/user/w/moin-1.9/MoinMoin/theme/__init__.py", line 1599, in add_msg
    logging.info('\n'.join(['Call stack for add_msg():'] + traceback.format_stack()))

default acl change?

I recently installed a new wiki and was not very careful with the ACLs, so it used the default ACL (which is r/w for everybody).

Only a few days later the wiki had a thousand spam pages and about as many new "users" (spammers).

While the user creation is an annoyance by itself, the spam page creation could be avoid by just having u"All:read" as default ACL, forcing wiki admins to set up their own acl_rights_before and acl_rights_default.

The default acl could be changed at 2 places:

  • in multiconfig.py (so it really is the default default acl)
  • in the sample configs (so it is better visible, but not really the default)

exclude newaccount action?

spam bots love to create new accounts...

we could exclude newaccount action in the sample config(s) and put some comment about the spam bot issue there.

build xapian index failed

hi,

I failed to build xapian index for moin, not sure what kind of this issue, any suggestions for this? thanks a lot!

env:
xapian-bindings 1.2.22
moinmoin: 1.9.8
Python 2.7.12

python /usr/lib/python2.7/dist-packages/MoinMoin/script/moin.py  \
  --config-dir=/home/nginx/pyenv/wiki/ --wiki-url=http://localhost/  \
  index build --mode=buildnewindex 

2019-03-26 16:55:43,250 INFO MoinMoin.log:151 using logging configuration read from built-in fallback in MoinMoin.log module
2019-03-26 16:55:43,250 INFO MoinMoin.log:157 Running MoinMoin 1.9.8 release code from /usr/lib/python2.7/dist-packages/MoinMoin
2019-03-26 16:55:49,960 INFO MoinMoin.config.multiconfig:127 using wiki config: /home/nginx/pyenv/wiki/wikiconfig.pyc
2019-03-26 16:56:02,198 INFO MoinMoin.search.Xapian.indexing:580 indexing 460 pages...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/moin.py", line 26, in <module>
    run()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/moin.py", line 17, in run
    MoinScript().run(showtime=0)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line 266, in mainloop
    plugin_class(args[2:], self.options).run() # all starts again there
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/index/build.py", line 86, in mainloop
    self.command()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/script/index/build.py", line 115, in command
    idx.indexPages(self.files, idx_mode)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/search/builtin.py", line 212, in indexPages
    self._index_pages(request, files, mode, pages=pages)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/search/Xapian/indexing.py", line 582, in _index_pages
    self._index_page(request, connection, pagename, mode=mode)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/search/Xapian/indexing.py", line 372, in _index_page
    updated = self._index_page_rev(request, connection, pagename, revno, mode=mode)
  File "/usr/lib/python2.7/dist-packages/MoinMoin/search/Xapian/indexing.py", line 404, in _index_page_rev
    mtime = page.mtime_usecs()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/Page.py", line 694, in mtime_usecs
    entry = self.editlog_entry()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/Page.py", line 532, in editlog_entry
    for entry in edit_log.reverse():
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/__init__.py", line 116, in reverse
    result = self.previous()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/__init__.py", line 323, in previous
    result = self.__previous()
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/__init__.py", line 312, in __previous
    return self.parser(self.__buffer.lines[self.__rel_index])
  File "/usr/lib/python2.7/dist-packages/MoinMoin/logfile/editlog.py", line 226, in parser
    result.ed_time_usecs = long(result.ed_time_usecs or '0') # has to be long for py 2.2.x
UnicodeEncodeError: 'decimal' codec can't encode characters in position 0-107: invalid decimal Unicode string

some index files generated as below, not sure should I ignore this or not.

(pyenv) root@PVGN56589222A:/home/nginx/pyenv/wiki# ls xapian_indx_dir/wikiconfig/index.new/flintlock  position.baseA  position.DB     postlist.baseB  record.baseA  record.DB       spelling.baseB  termlist.baseA  termlist.DBiamchert   position.baseB  postlist.baseA  postlist.DB     record.baseB  spelling.baseA  spelling.DB     termlist.baseB
..
18M     xapian_indx_dir/wikiconfig/index.new

Best regards,
Hua

xapian indexing crashes for too long names

Traceback (most recent call last):
  File "/srv/moin-1.9/MoinMoin/script/moin.py", line 24, in <module>
    run()
  File "/srv/moin-1.9/MoinMoin/script/moin.py", line 15, in run
    MoinScript().run(showtime=0)
  File "/srv/moin-1.9/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/srv/moin-1.9/MoinMoin/script/__init__.py", line 266, in mainloop
    plugin_class(args[2:], self.options).run() # all starts again there
  File "/srv/moin-1.9/MoinMoin/script/__init__.py", line 138, in run
    self.mainloop()
  File "/srv/moin-1.9/MoinMoin/script/index/build.py", line 86, in mainloop
    self.command()
  File "/srv/moin-1.9/MoinMoin/script/index/build.py", line 113, in command
    idx.indexPagesQueued(int(self.options.count))
  File "/srv/moin-1.9/MoinMoin/search/builtin.py", line 199, in indexPagesQueued
    done_count = self.do_queued_updates(count)
  File "/srv/moin-1.9/MoinMoin/search/Xapian/indexing.py", line 216, in do_queued_updates
    self._index_page(request, connection, pagename, mode='update')
  File "/srv/moin-1.9/MoinMoin/search/Xapian/indexing.py", line 386, in _index_page
    self._index_attachment(request, connection, pagename, attachmentname, mode)
  File "/srv/moin-1.9/MoinMoin/search/Xapian/indexing.py", line 493, in _index_attachment
    connection.replace(doc)
  File "/srv/moin-1.9/MoinMoin/support/xappy/indexerconnection.py", line 319, in replace
    self._index.replace_document('Q' + id, xapdoc)
xapian.InvalidArgumentError: Term too long (> 245): QWikiName:<LongPageName>/<LongAttachmentName>

dealing with 1.9.11 / the contained security fixes

for dist package maintainers

due to the upgrades of the bundled software, especially the werkzeug upgrade, 1.9.11 might require also upgrading other packages (or using the bundled code under MoinMoin/support).

due to that, if you want to urgently get out the security fixes, it might be easier to just apply the patches for these to whatever you have as package right now. the changeset ids are given in docs/CHANGES.

for users

If you run from source or from the pypi package, upgrading as usual should mostly work.

If you use the ProxyFix middleware (from your wsgi adapter file), you need to import it slightly differently, see docs/CHANGES.

disable gui editor by default

fckeditor 2.6.11 (as we bundle it) is unmaintained since years. it might have unfixed security issues.

also, the gui editor integration in moin has quite some issues (as our docs point out since long).

so it might make sense just disabling it by default and only offering the text editor.

anybody who wants to enable it could do so in the wikiconfig / farmconfig.

edit-log and event-log/write access

I'm trying to place MoinMoin on a read only file system. I am able to define writable mounts on that system, and can get MoinMoin to run by making wiki/data and wiki/underlay writable. My problem is that in data there is code there I don't really want in a writable mount. I can define wiki/data/pages as writable, but MoinMoin won't run properly because edit-log and event-log are free in data.

Not really an issue, it's just unclear to me how MoinMoin finds the location of these files and how it would be possible to modify that to its own data/logging subdirectory.

mailimport not working

MoinMoin.xmlrpc.ProcessMail ERROR An error occurred while processing the message: ("No suitable user found for mail address u'Mustermann'",)
MoinMoin.wsgiapp ERROR An exception has occurred [https://info.*.*/?action=xmlrpc2].
Traceback (most recent call last):
File "/srv/moin-1.9/MoinMoin/wsgiapp.py", line 264, in __call__
     response = run(context)
File "/srv/moin-1.9/MoinMoin/wsgiapp.py", line 90, in run
     context.cfg.session_service.finalize(context, context.session)
File "/srv/moin-1.9/MoinMoin/web/session.py", line 179, in finalize
     if request.user.auth_method == 'setuid':
AttributeError: 'NoneType' object has no attribute 'auth_method'

check reverse dns lookup

if the default is still to do it, change the default to "disabled" / add a setting to enable it.

/me tired of reading complaints about moin slowness just because their reverse dns is broken.

cache permission errors in moin 1.9.10 / apache 2.2 / Centos6

raise CacheError(str(err))
[Wed Jun 09 13:21:55 2021] [error] [client 5.80.25.21] CacheError: [Errno 13] Permission denied: '/srv/www/wikis/epp/data/cache/epp/drafts/1502880486.68.42100123PhE.tmp'

When I tried to change some lines in a page and "save changes"

Any idea?

Thanks

Roberto

pip install moin crash when ascii codec in setup.cfg

pip install moin

 Using cached https://files.pythonhosted.org/packages/db/c4/58872c31f3c242c2cec3a35f493628182979b664645858dafba4071b9cb5/moin-1.9.10.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-9h3pHq/moin/setup.py", line 355, in <module>
        setup(**setup_args)
      File "/usr/lib/python2.7/distutils/core.py", line 124, in setup
        dist.parse_config_files()
      File "/tmp/prova/local/lib/python2.7/site-packages/setuptools/dist.py", line 702, in parse_config_files
        self._parse_config_files(filenames=filenames)
      File "/tmp/prova/local/lib/python2.7/site-packages/setuptools/dist.py", line 599, in _parse_config_files
        (parser.read_file if six.PY3 else parser.readfp)(reader)
      File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
        self._read(fp, filename)
      File "/usr/lib/python2.7/ConfigParser.py", line 481, in _read
        line = fp.readline()
      File "/tmp/prova/lib/python2.7/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 57: ordinal not in range(128)

The reason is that setup.cfg there are some characters can't codec: "Jürgen"

Finally I download from source code and done with:

moin-1.9$ python setup.py install

i18n crash fix?

from moin-devel mailing list by Paul Boddie:

Thanks for taking care of this release!

I don't have a GitHub account that I generally use for personal projects, but 
there is one very simple patch that I would like to suggest that might help 
people generally:

----

diff --git a/MoinMoin/i18n/__init__.py b/MoinMoin/i18n/__init__.py
index 17061a83..b5abdf25 100644
--- a/MoinMoin/i18n/__init__.py
+++ b/MoinMoin/i18n/__init__.py
@@ -255,7 +255,7 @@ class Translation(object):

 def getDirection(lang):
     """ Return the text direction for a language, either 'ltr' or 'rtl'. """
-    return languages[lang]['x-direction']
+    return languages and languages[lang]['x-direction'] or 'ltr'

 def getText(original, request, lang, **kw):
     """ Return a translation of some original text.

----

Previously, when upgrading Moin, there have been times when it just breaks in 
a nasty and seemingly inexplicable way, and I am pretty sure we have had to 
troubleshoot this a few times on this list or via bug reports.

In the above, where there is some cache issue, the getDirection function fails 
because the languages mapping is not set up properly (or at the time of 
invocation), and I am not even sure that the usual "moin maint cleancache" 
advice helps.

This seems to have occurred in different forms several times over the years. 
For example:

https://moinmo.in/MoinMoinBugs/1.8TypeError_in_i18n.__init__after_upgrade
https://moinmo.in/MoinMoinBugs/I18nLanguagesNotSetInSetupI18nPreauth

Interestingly, the latter of the above bug reports links to a patch that 
potentially fixes the problem but only for WSGI. (Yes, I am still using CGI 
for the few wikis I have running.)

Anyway, thanks once again for the hard work!

Paul

it's 2018

update the year where appropriate.

Difficulties running on non-root mounted URL

I'm running moinmoin behind a apache reverse proxy at url /moinmoin/.

I've set these values to get most of the links working:

url_prefix_static = '/moinmoin' + url_prefix_static
url_prefix_local = '/moinmoin/'
url_mappings = { '/': '/moinmoin/' }

But at least login page doesn't respect these - login action is /LanguageSetup which is outside moinmoin.

pip install moin fails

  • ubuntu 18.04
  • pip 19.0.3
  • Python 3.6.7
(tfgpu1) robin@thor:/SRC/pathway$ pip install moin
Collecting moin
  Using cached https://files.pythonhosted.org/packages/db/c4/58872c31f3c242c2cec3a35f493628182979b664645858dafba4071b9cb5/moin-1.9.10.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-enx51tia/moin/setup.py", line 68
        def visit((prefix, strip, found), dirname, names):
                  ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-enx51tia/moin/

Moin + Apache over NFS

Hi,

I have noticed that while
moin 1.9.10 + Apache 2.2.15 + Centos 6.10
works with data_dir and underlay mounted over NFS
moin1.9.11 + Apache 2.4.6 + Centos 7.9.2009
does not
image
It gives 500 Internal error and in the logs

[Wed Jun 02 14:03:13.458126 2021] [:error] [pid 11713] 2021-06-02 14:03:13,458 INFO MoinMoin.config.multiconfig:127 using wiki config: /etc/moin/epp.py
[Wed Jun 02 14:03:16.253860 2021] [:error] [pid 11713] 2021-06-02 14:03:16,252 ERROR MoinMoin.wsgiapp:281 An exception has occurred [http://epp-wiki.hpc.susx.ac.uk/].
[Wed Jun 02 14:03:16.253910 2021] [:error] [pid 11713] Traceback (most recent call last):
[Wed Jun 02 14:03:16.253915 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/wsgiapp.py", line 264, in call
[Wed Jun 02 14:03:16.253917 2021] [:error] [pid 11713] response = run(context)
[Wed Jun 02 14:03:16.253919 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/wsgiapp.py", line 89, in run
[Wed Jun 02 14:03:16.253921 2021] [:error] [pid 11713] response = dispatch(request, context, action_name)
[Wed Jun 02 14:03:16.253923 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/wsgiapp.py", line 137, in dispatch
[Wed Jun 02 14:03:16.253925 2021] [:error] [pid 11713] response = handle_action(context, pagename, action_name)
[Wed Jun 02 14:03:16.253927 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/wsgiapp.py", line 203, in handle_action
[Wed Jun 02 14:03:16.253929 2021] [:error] [pid 11713] handler(context.page.page_name, context)
[Wed Jun 02 14:03:16.253931 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/action/init.py", line 267, in do_show
[Wed Jun 02 14:03:16.253933 2021] [:error] [pid 11713] content_only=content_only,
[Wed Jun 02 14:03:16.253935 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/Page.py", line 1332, in send_page
[Wed Jun 02 14:03:16.253937 2021] [:error] [pid 11713] start_line=pi['lines'])
[Wed Jun 02 14:03:16.253939 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/Page.py", line 1426, in send_page_content
[Wed Jun 02 14:03:16.253941 2021] [:error] [pid 11713] self.execute(request, parser, code)
[Wed Jun 02 14:03:16.253943 2021] [:error] [pid 11713] File "/usr/lib64/pypy-5.0.1/site-packages/MoinMoin/Page.py", line 1457, in execute
[Wed Jun 02 14:03:16.253945 2021] [:error] [pid 11713] exec code
[Wed Jun 02 14:03:16.253947 2021] [:error] [pid 11713] File "EPP", line 2, in
[Wed Jun 02 14:03:16.253949 2021] [:error] [pid 11713] TypeError: 'dict' object is not callable
[Wed Jun 02 14:03:16.254023 2021] [:error] [pid 11713] [remote 54.209.62.75:144] mod_wsgi (pid=11713): Exception occurred processing WSGI script '/usr/lib64/pypy-5.0.1/share/moin/server/moin.wsgi'.
[Wed Jun 02 14:03:16.254049 2021] [:error] [pid 11713] [remote 54.209.62.75:144] Traceback (most recent call last):

.....
.....

===============
Same data copied locally works perfectly!!

ability to send full page on subscribed change instead of diff for emailnotify

Currently a diff is send to users subscribing to a PageChangedEvent.

Some users want to get the full page text emailed along with the diff, to easier read the updated text in full.

Ideally a user could chose to have the change be send as diff or full email or both.

(Opening this feature request here, because this is the place were new feature request should go according to http://moinmo.in/FeatureRequests. And I did not find anything seaching the wiki and here about an existing request
or patch.)

moin 1.9.11 renders pages differently than 1.9.10

Hi there,

I am testing a moin moin server 1.9.11 created with Centos7+Apache 2.4 using the data
from Centos6+moin 1.9.10 + Apache 2.2.
I was able to make it work copying the data across. However, the pages are rendered differently
image

(old version)

image
image
image

(New version)

=======================================

Any idea where to start from to troubleshoot this?

Many thanks

Dr Roberto Scipioni
MPS Research Computing Support Engineer

please help testing master branch

after a long time of nothing, i need to make a maintenance release again:

  • updated bundled libraries, esp. a bigger werkzeug upgrade
  • a few fixes, including some important ones
  • no new features

it would be good if some people could help testing master branch and give feedback here to avoid issues in next release.

i don't do moin-1.9 releases often these days, so we better get it right at the first try. :-)

security of moin 1.9 / migration to other wiki engine?

Hi guys,

Some people here at University mentioned the possibility of migrating a MoinMoin Server to a different wiki server claiming that MoinMoini is not safe and "out of support".

  1. Is this statement correct?

  2. How easy is to migrate Moin Moin to a different kind of wiki?

  3. Does any of you have any experience with that?

Cheers

Roberto
University of Sussex

AttachFile move: unicode normalization troubles

Some characters can be encoded differently, e.g. the german umlaut ä can be:

# NFC normalization (composed):
>>> print("\xc3\xa4".decode('utf8'))
ä
# NFD normalization (decomposed):
>>> print("a\xcc\x88".decode('utf8'))
ä

So it is both an ä somehow, but different unicode method:

>>> "\xc3\xa4".decode('utf8')
u'\xe4'
>>> "a\xcc\x88".decode('utf8')
u'a\u0308'

Uploading an attachment with ä as a\xCC\x88 encoding makes it later impossible to rename:

File "/srv/moin-1.9/MoinMoin/action/AttachFile.py", line 301, in
move_attachment
     filesize = os.path.getsize(attachment_path)
File "/usr/lib/python2.7/genericpath.py", line 57, in getsize
     return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/srv/.../attachments/...\\xc3\\xa4....pdf'

pre-release testing

To avoid a buggy release, some pre-release testing is needed.

Here is how you can help:

  • use the https://moinmo.in/ (in general) or https://master19.moinmo.in/ (for translations) sites, they run the current code
  • clone the git repo and try out the code yourself (can be done locally by just running the wikiserver.py [but in that case, keep in mind you have a relaxed-security MoinMoin Desktop Edition])

The code for 1.9.10 is prepared in this branch: https://github.com/moinwiki/moin-1.9/tree/rel1.9.10

Read the CHANGES file to see what should be tested (what changed since 1.9.9):

https://github.com/moinwiki/moin-1.9/blob/rel1.9.10/docs/CHANGES#L13

htaccess file with some local stuff found

Hello,

I found this htaccess file with some local references in the FCKeditor, might not be a security issue, but i think it could be removed:

./MoinMoin/web/static/htdocs/applets/FCKeditor/editor/filemanager/connectors/py/htaccess.txt:PythonPath "[r'C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\fckeditor\editor\filemanager\connectors\py'] + sys.path"

Regards and thanks for your work.

Doesn't recognize `tel:` uris

Tried:

(actual number obscurified)

[[tel:1234567890|123-456-7890]]

Got:

<a class="nonexistent" href="/tel%3A1234567890">123-456-7890</a>

Expected:

<a class="tel" href="tel:1234567890">123-456-7890</a>

Correct Starter and Link for Windows executables

An old issue with version 1.5 in Windows - the link is not coming right to execute.

The problem is gone with a file with extension .cmd
e.g. startmoin.cmd in the program-directory,
and the content of:

@echo off

start cmd.exe /k "moin"

exit

exit

Now You can set the link with drag and drop per right-mouse-drag and drop to the
place from where you would start with these and choose set link from context coming.
You can rename the link how you mean.
With an address how http://localhost:8080/FindPage into the address-row of browser
is all done to reach the wiki!

traceback in werkzeug for fallback:iso-8859-1 error handler

In MoinMoin 1.9.10 all pages that have a <<Hits>> hit counter:

  • The output of the hit counter is:
    <<Hits: Ausführung fehlgeschlagen [unknown error handler name 'fallback:iso-8859-1'] (siehe auch die Log-Datei)>>
  • The apache log contains this:
2018-09-14 21:40:16,034 ERROR MoinMoin.macro:139 Macro Hits (page: 'Rückblick/2018/Vorwort') raised an exception:
Traceback (most recent call last):
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/macro/__init__.py", line 129, in execute
    return execute(self, args)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/macro/__init__.py", line 114, in <lambda>
    _self.request, call, _args, [_self])
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/wikiutil.py", line 1965, in invoke_extension_function
    return function(*fixed_args, **kwargs)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/macro/Hits.py", line 29, in macro_Hits
    cache_days, cache_views, cache_edits = hitcounts.get_data(pagename, request, filterpage=pagename)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/stats/hitcounts.py", line 88, in get_data
    for event in log.reverse():
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/logfile/__init__.py", line 116, in reverse
    result = self.previous()
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/logfile/__init__.py", line 323, in previous
    result = self.__previous()
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/logfile/__init__.py", line 312, in __previous
    return self.parser(self.__buffer.lines[self.__rel_index])
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/logfile/eventlog.py", line 67, in parser
    return long(time_usecs), eventtype, wikiutil.parseQueryString(kvpairs)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/wikiutil.py", line 132, in parseQueryString
    decode_keys=False, include_empty=False)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/support/werkzeug/urls.py", line 734, in url_decode
    include_empty, errors))
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/support/werkzeug/datastructures.py", line 409, in __init__
    for key, value in mapping or ():
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/support/werkzeug/urls.py", line 793, in _url_decode_impl
    yield key, url_unquote_plus(value, charset, errors)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/support/werkzeug/urls.py", line 556, in url_unquote_plus
    return url_unquote(s, charset, errors)
  File "/var/moin/1.9.10/lib/python2.7/site-packages/MoinMoin/support/werkzeug/urls.py", line 535, in url_unquote
    rv = rv.decode(charset, errors)
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
LookupError: unknown error handler name 'fallback:iso-8859-1'

After commenting out the hit counter the pages load normally. You have the phenomenon in your own wiki. See:

https://moinmo.in/EventStats/HitCounts

It says:

<<StatsChart: Ausführung fehlgeschlagen [unknown error handler name 'fallback:iso-8859-1'] (siehe auch die Log-Datei)>>

Install fails due to decoding error on python2

This issue has already been reported by #40, however I am still having the issue to install moin==1.9.10 on a python2 Virtual Environment on Ubuntu 16.04. Commit 4a708cd has been merged onto master but hasn't been released yet.

If I download the tarball for version 1.9.10 the UTF-8 Character is still present in the setup.cfg and setup.py.

As already mentioned in ticket #40 here the output I get when trying to install moin==1.9.10 in a python2 virtual environment.

$ ./env/bin/pip install moin==1.9.10
Looking in indexes: https://pypi.org/simple, https://devpi.dtt.ptech.lu/coss/public
Collecting moin==1.9.10
  Using cached moin-1.9.10.tar.gz (37.3 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/users/frank/workspace/ipswiki/env/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-keXHzx/moin/setup.py'"'"'; __file__='"'"'/tmp/pip-install-keXHzx/moin/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-keXHzx/moin/pip-egg-info
         cwd: /tmp/pip-install-keXHzx/moin/
    Complete output (17 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-keXHzx/moin/setup.py", line 355, in <module>
        setup(**setup_args)
      File "/usr/lib/python2.7/distutils/core.py", line 124, in setup
        dist.parse_config_files()
      File "/home/users/frank/workspace/ipswiki/env/local/lib/python2.7/site-packages/setuptools/dist.py", line 699, in parse_config_files
        self._parse_config_files(filenames=filenames)
      File "/home/users/frank/workspace/ipswiki/env/local/lib/python2.7/site-packages/setuptools/dist.py", line 596, in _parse_config_files
        (parser.read_file if six.PY3 else parser.readfp)(reader)
      File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
        self._read(fp, filename)
      File "/usr/lib/python2.7/ConfigParser.py", line 479, in _read
        line = fp.readline()
      File "/home/users/frank/workspace/ipswiki/env/lib/python2.7/codecs.py", line 314, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf8' codec can't decode byte 0xfc in position 57: invalid start byte
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Pip Version used: 20.0.1

fix comments

After the other fixes are merged, before the release, also fix some comments:

--- a/MoinMoin/action/AttachFile.py
+++ b/MoinMoin/action/AttachFile.py
@@ -1220,7 +1220,6 @@ def send_viewfile(pagename, request):
 
     mt = wikiutil.MimeType(filename=filename)
 
-    # destinguishs if browser need a plugin in place
     if mt.major == 'image' and mt.minor in config.browser_supported_images:
         url = getAttachUrl(pagename, filename, request)
         request.write('<img src="%s" alt="%s">' % (

--- a/MoinMoin/config/__init__.py
+++ b/MoinMoin/config/__init__.py
@@ -11,7 +11,7 @@ from MoinMoin import version
 # unicode: set the char types (upper, lower, digits, spaces)
 from MoinMoin.util.chartypes import *
 
-# List of image types browser do support regulary
+# List of image types for which browsers usually have native support

Advanced Search does not work correctly with multiple categories

In <<AdvancedSearch>> macro (used on FindPage) you can select multiple categories (with Ctrl + click). In case of such a selection I would expect that the user wants to search pages that have all of the selected categories.

Currently (MoinMoin 1.9.10), if you select categories CategoryCat1 and CategoryCat2, the macro creates search query that includes the following expression:
category:CategoryCat1,CategoryCat2
which does not return expected result.

Instead, the search query should include the following expression:
(category:CategoryCat1 category:CategoryCat2)
which correctly finds pages that have both categories. I tested this by using the expression in the MoinMoin default search field (top right).

Could someone improve the macro to work correctly with multiple categories selected? I had a look at MoinMoin/macro/AdvancedSearch.py but my knowledge of Python is not sufficient to make necessary changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.