moin icon indicating copy to clipboard operation
moin copied to clipboard

"Wanted Items" showing internal wiki links (routes starting with "+").

Open roland-ruedenauer opened this issue 9 months ago • 1 comments

I created a wiki page containing the line Visit the [[+index/all|Global Index]].. When visiting the "Wanted Items" page, I see it lists +index/all as a wanted item.

Expected: internal wiki links shouldn't appear in the wanted items list.

roland-ruedenauer avatar Mar 19 '25 23:03 roland-ruedenauer

While testing this issue I found other problems.
The link in the test item is shown as non-existent item. When looking at the meta data of the test item it shows "Item Links: +index/all" as non-existent item.

The following method handles some views, but does not include "+index/":

https://github.com/moinwiki/moin/blob/9188a85470ccb6c138d76b38533e2fd3b2c3ec7a/src/moin/converters/link.py#L187

The same applies to

https://github.com/moinwiki/moin/blob/9188a85470ccb6c138d76b38533e2fd3b2c3ec7a/src/moin/themes/init.py#L552

IMO we need a new function to check for all possible routes in Flask and prevent running flaskg.storage.has_item() for routes without item_name parameter.

The code for creation of the wanted items list is here:

https://github.com/moinwiki/moin/blob/9188a85470ccb6c138d76b38533e2fd3b2c3ec7a/src/moin/apps/frontend/views.py#L1891

UlrichB22 avatar Mar 25 '25 22:03 UlrichB22

IMO this issue is fixed and can be closed.

@roland-ruedenauer, thanks for your support.

UlrichB22 avatar Jul 19 '25 20:07 UlrichB22