Failing to export to Piwigo. How to debug?
Felix Kloss
felix.kloss at mail.de
Tue Apr 25 16:26:46 BST 2023
Hello,
I recently set up a self-hosted Piwigo instance and would like to upload
pictures directly from digiKam. It worked for one or two pictures in
the beginning but now always fails with this error:
> Failed to upload media into remote Piwigo. Error transferring
> https://photos.luator.de/ws.php - server replied: Forbidden
I checked the server logs and found the following:
When "Resize photos before uploading" is enabled:
ModSecurity: [file
"/etc/httpd/conf/modsecurity.d/rules/tortix/modsec/10_asl_rules.conf"]
[line "389"] [id "340029"] [rev "37"] [msg "Atomicorp.com WAF Rules:
Attack Blocked - command in REQUEST_URI or Argument"] [data "/nc "]
[severity "CRITICAL"] Access denied with code 403 (phase 2). Pattern
match "(?:;|/|\\\\|
)(?:\\\\b(?:cat|ls|perl|uname|pwd|cp|tclsh8?|cpp|f(?:etch|tp)|python|chown|rm|ping|rsync|rdiff-backup|scp|(?:w|ftp)get|curl|links|g\\\\+\\\\+|ch(?:grp|own)|passwd|r?(?:b|d)ash|t?c?sh|telnet|clang|nc)\\\\b
|\\\\b(?:sleep|benchmark)\\\\b \\\\(? ?[0-9]|power ..." at ARGS:data.
[hostname "photos.luator.de"] [uri "/ws.php"] [unique_id
"ZEFFshFAvrfOIzhECOZbXwAAABc"]
I don't know anything about ModSecurity but found this description of
the error:
https://docs.atomicorp.com/rules/waf/10_asl_rules.conf.html#waf-rule-id-340029
Interestingly, if I disable the resizing before upload, I get a
different error (something about spam, which doesn't make sense to me):
2023-04-20 16:13:06 Error 88.130.216.72 [client 88.130.216.72]
ModSecurity: [file
"/etc/httpd/conf/modsecurity.d/rules/tortix/modsec/30_asl_antispam.conf"]
[line "213"] [id "300051"] [rev "9"] [msg "Atomicorp.com WAF AntiSpam
Rules: Possible Spam: General"] [data " 732951 found within ARGS:data:
gkpwnn8jkuo4tftwvxh+g2b5nmgptu+ljjvjrafisyxhmghy4ywqufbnib2iju2wj27c9sxgegolgcgnc3vpvbomaohifjjmstem97cgmguv5koqiy0ot10wp6amljtj6ws+5xzzhq1+erh4thntabmteeuf0a13h2jdwyc4ybsa8daitfvr8tlk0fmzojurisqmamm//agtwed7jtgfry4q40zdonz46euyxww4odjeub03j9o2k7k0myssz/lulgrttcbh1udrcgrqkhz1bnj5wufjyphsvheznsyp+xaiadwf+ik4yge1pccr1bdlqgykwye0qkia5pi6fzkomomnqotdpen+yjtytvpgxtizwcr8ybhb5op6snk15vrh1nerkfxjjyikbcbwlu1iqgst1iiuwkzrg+5n3kb73spuptxirlws0cw1ikrfhb3kbog2wisdgovl5tbptbgloj5pzliay..."]
[severity "WARNING"] Access denied with code 403 (phase 2). Pattern
match "(?:magazine[ -_.,\\"\\\\'\\\\|]?(?:finder|netfirms)|rolex[
-_.,\\"\\\\'\\\\|]|z0rder|well-fargo|phvonline|weight-watcher|virility[
-_.,\\"\\\\'\\\\|]pills|squirrelht|sams-club-online|nexium-online|levaquin-500|golden-coins|gmac-mortgage-corp|enlarge(ment)?pi
[hostname "photos.luator.de"] [uri "/ws.php"] [unique_id
"ZEFIcBFAvrfOIzhECOZgtAAAADs"]
Any idea what is causing this and if there is a way for me to fix it?
Any hint on how I may debug this, would be very welcome. For example,
is there a log somewhere, where I can see the exact request that digiKam
sends to the server?
I already posted the question on pixls.us
(https://discuss.pixls.us/t/failing-to-export-to-piwigo/36745) and a
user there said that on piwigo.com it is working for them, so likely it
has to do with the configuration of my server (which is just a very
simple web hosting package, so probably I can't change that config...).
Anyway, I also tested the export to Piwigo in darktable and there it is
working, so I still have some hope that there is something I can do to
make it work with digiKam as well.
In case it matters: I'm using the digiKam 8.0.0 AppImage on Kubuntu 22.04.
Best,
Felix
More information about the Digikam-users
mailing list