Failing to export to Piwigo. How to debug?
Maik Qualmann
metzpinguin at gmail.com
Tue Apr 25 21:27:06 BST 2023
This server error message states that there are Linux commands or script
language commands in the network request. Now we send photo information of the
respective images, i.e. the metadata fields of the author, comment, file name,
date, etc. Presumably "Linux" commands are recognized in this data by your
images. Surely there is definitely a way to disable these security rules. A
sample image would be interesting, however, which triggers this error.
Maik
Am Dienstag, 25. April 2023, 17:26:46 CEST schrieb Felix Kloss:
> 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|r
> m|ping|rsync|rdiff-backup|scp|(?:w|ftp)get|curl|links|g\\\\+\\\\+|ch(?:grp|o
> wn)|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-3400
> 29
>
> 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+ljjvjrafisyxhmghy4ywqufbnib2iju2wj27c9sxgegol
> gcgnc3vpvbomaohifjjmstem97cgmguv5koqiy0ot10wp6amljtj6ws+5xzzhq1+erh4thntabmt
> eeuf0a13h2jdwyc4ybsa8daitfvr8tlk0fmzojurisqmamm//agtwed7jtgfry4q40zdonz46euy
> xww4odjeub03j9o2k7k0myssz/lulgrttcbh1udrcgrqkhz1bnj5wufjyphsvheznsyp+xaiadwf
> +ik4yge1pccr1bdlqgykwye0qkia5pi6fzkomomnqotdpen+yjtytvpgxtizwcr8ybhb5op6snk1
> 5vrh1nerkfxjjyikbcbwlu1iqgst1iiuwkzrg+5n3kb73spuptxirlws0cw1ikrfhb3kbog2wisd
> govl5tbptbgloj5pzliay..."] [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-5
> 00|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