My own tool uses
exiftool
to do the removing, I'm a bit more specific in that I only remove the location metadata with
-location:all=
rather than everything. You'll find however if you just go ahead and strip the data you break the attachments very quickly. They are named for the MD5 hash of the file - which would be different after the file has been edited by
exiftool
so really you need to update the
xf_attachments_data
table and rename the data file and thumbnail appropriately as I think (and it's been a while since I checked) that XF does check the hash before displaying the file - so if there is a miss-match you wont get an image shown.
You could safely use
exiftool
however to see if you have anything with location metadata encoded in it by running
exiftool
, for example lets assume you had your XF install at
/var/www/forum.example.com
and the directory structure is standard. You might for instance run
exiftool -location:all -G -a -j /var/www/forum.example.com/internal_data/attachments/6/*.data
In that example I'm just scanning one directory (6) - you'll find numbered directories in the
internal_data/attachments
directory - they are named for
data_id
of each upload. I expect if I tried to scan all the directories the argument list would be too long (best use
find
to process the whole lot) so it seemed silly to suggest that as an example. Anyhow that would kick out results in JSON format, which would look something like:
JSON:
{
"SourceFile": "internal_data/attachments/6/6269-4c3e3cc924b72acc7bf11357fb1546a4.data"
},
{
"SourceFile": "internal_data/attachments/6/6270-d732e4806c17c4d635d53c30189dc383.data",
"MakerNotes:Location": "",
"MakerNotes:Country": "",
"MakerNotes:State": "",
"MakerNotes:City": "",
"MakerNotes:Landmark": "",
"MakerNotes:City2": ""
}
So the first file there has no location data, the second one has location data, although it's all blank in that example.
So that's a long winded way of saying, yes you can use
exiftool
, but you need to be careful and know what you're doing with the XF data structure.