The history of thumbnails (or just a previous thumbnail) is embedded in an image file?

I was surprised when I cropped an image on Windows Phone, saved it, sent it via e-mail to a PC, and then downloaded it – and the thumbnail in the download folder was the one of original, not cropped image for a few seconds until finally it would refresh to the expected one.

Maybe I just don’t know something obvious, but because I couldn’t find any information on image file thumbnail history, jpg old thumbnail stored in file and similar searches, I think that while it may be a known functionality of some image formats, then surely not known widely enough by users. An unaware user might make a photo with private data, crop the private data out and send it to someone, and this private data can not only be possibly acquired from a thumbnail by the intended receiver, but the image may be traveling from hands to hands – there might be millions of images over the Internet which contain private information in old thumbnails.

Here’s some examples:

  • A photo of an identity card can be watermarked for a specific company with a company’s name and a date, e.g. Quizzacious Systems 2016/03/05, to confirm an identity of a player which forgot a password; if a support employee has evil intentions, he can take a previous thumbnail of the image, which has no watermark, and use it to confirm his identity as this person – thumbnails in extra large size actually have a comparable resolution with cheap cellphones and may be accepted as a proof of an identity at least by some companies.
  • A photo of an identity card or anything else with some information censored out by black rectangles – everyone with minimum knowledge knows, that a black rectangle in some formats is not just another layer of data, but removes the original data behind it; at least that’s what I thought before discovering this vulnerability. It seems, however, that you can take a censored image and read censored data from it’s old thumbnail – the resolution might be too low for a scan of a sheet of paper, but it can be enough for something of a size of an ID.
  • A photographic proof may be tested for authenticity by checking an old thumbnail and what was cropped out.
  • A photo with nakedness can be censored or cropped and then get popular over the Internet.

So what I’m missing here? It seems a serious security vulnerability, something at least a common user should be well aware of, and yet I wasn’t. Microsoft answered on my e-mail:

this is not a valid vulnerability as this is by design. This functionality is also inline with cropping in Office.

However I was aware of that in case of MS Office (still many users might not be), and if you print the document to either paper or PDF the cropped data is lost; you can also use the “compress” feature and remove cropped parts of an image there. How to you deal with JPG files, though?

  1. Is there a tool to read old thumbnails of images?
  2. How to remove data from an image permanently?
  3. Is it just a single previous thumbnail or all previous thumbnails that are stored?
  4. Does it affect only thumbnails, or – as MS suggests – it works like in Office and whole original photo is stored in a file?
  5. Where can I read more about this issue/feature?

How to remove files from a sparsebundle file (previous Time Machine image)?

I have a sparsebundle file that I pulled off of an old Time Machine backup disk. I’d like to save the file if possible, but remove the media files from it (movies, music, etc.) because those are elsewhere.

However, I cannot seem to figure out how to get it to be mounted RW and/or how modify the image in any way.

bash-3.2$   hdiutil pmap geek-imac.sparsebundle  MEDIA: ""; Size 2 TB [3902834784 x 512]; Max Transfer Blocks 2048 SCHEME: 1 GPT, "GPT Partition Scheme" [16] SECTION: 1 Type:'MAP'; Size 2 TB [3902834784 x 512]; Offset 34 Blocks (3902834717 + 67) x 512 ID Type                 Offset       Size         Name                      (2) -- -------------------- ------------ ------------ -------------------- --------  1 EFI                            40       409600 EFI System Partition  2 Apple_HFS                  409640   3902162960 disk image              Free                   3902572600       262151 

I can mount it

bash-3.2$   hdiutil attach  -readwrite geek-imac.sparsebundle -shadow /dev/disk3              GUID_partition_scheme            /dev/disk3s1            EFI                              /dev/disk3s2            Apple_HFS                       /Volumes/Time Machine Backups 

Everything seems ok

bash-3.2$   hdiutil info framework       : 480.60.2 driver          : 10.13v480.60.2 ================================================ image-path      : /Volumes/Media-External/Old Time Machine Backups/geek-imac.sparsebundle image-alias     : /Volumes/Media-External/Old Time Machine Backups/geek-imac.sparsebundle shadow-path     : /Volumes/Media-External/Old Time Machine Backups/geek-imac.sparsebundle.shadow shadow-alias    : /Volumes/Media-External/Old Time Machine Backups/geek-imac.sparsebundle.shadow icon-path       : /System/Library/PrivateFrameworks/DiskImages.framework/Resources/CDiskImage.icns image-type      : sparse bundle disk image (shadowed) system-image    : false blockcount      : 3902834784 blocksize       : 512 writeable       : TRUE autodiskmount   : TRUE removable       : TRUE image-encrypted : false mounting user   : geek mounting mode   : <unknown> process ID      : 15146 /dev/disk3      GUID_partition_scheme    /dev/disk3s1    C12A7328-F81F-11D2-BA4B-00A0C93EC93B /dev/disk3s2    48465300-0000-11AA-AA11-00306543ECAC    /Volumes/Time Machine Backups  bash-3.2$   mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) /dev/disk1s2 on /Volumes/Media-External (hfs, local, nodev, nosuid, journaled, noowners) /dev/disk3s2 on /Volumes/Time Machine Backups (hfs, local, nodev, nosuid, journaled, noowners, mounted by geek) 

But I cannot remove files

bash-3.2$   rm -f /Volumes/Time\ Machine\ Backups/Backups.backupdb/geek-imac/Latest/Macintosh\ HD/Users/geek/Movies/movie.m4v  rm: /Volumes/Time Machine Backups/Backups.backupdb/geek-imac/Latest/Macintosh HD/Users/geek/Movies/movie.m4v: Permission denied bash-3.2$   sudo rm -f /Volumes/Time\ Machine\ Backups/Backups.backupdb/geek-imac/Latest/Macintosh\ HD/Users/geek/Movies/movie.m4v  Password: rm: /Volumes/Time Machine Backups/Backups.backupdb/geek-imac/Latest/Macintosh HD/Users/geek/Movies/movie.m4v: Operation not permitted 

How can I remove files from this sparsebundle image and/or convert (or even copy) this to a sparsebundle that supports modification?

Google Sheets [Script]: Add new row to the top when previous one is filled up

I have a spreadsheet where I record info by rows and it’s troublesome to scroll down to type out in a new row.

I’m looking for a script to help me add new rows.

What happens is that row 2 is blank (row 1 is header) and once filled (4 cells), a new row is inserted on row 2, pushing all the rows down. I have no need for formulas to be copied.

I have looked through the forum and there are many examples given but they are too complicated to many other functions e.g. add X amount of rows when filled etc.

Swap previous non-whitespace character in emacs buffer with some known analogue

Emacs command for quick substitution of previously-typed character. This is supposed to help input umlauts quicker by switching letters to their analogues and so on.

(defun krv/last-char-check (&optional pos)   "Find previous non-whitespace character in current string.  Return in form of (position . character) cons nor nil"   (save-excursion     (let ((cur-pos (or (and pos (goto-char pos))                        (point))))       (loop for prev-char = (preceding-char) then (preceding-char)             for back-pos = 0 then (1- back-pos)             when (bolp) return nil             ; known whitespaces listed             unless (member prev-char (list ?\ ?\xA0 ?\t)) return (cons back-pos prev-char)             else do (backward-char)))))  (defun krv/unwrap-list-to-alist (list-form)   "Helper function for setting character substitutions"   (loop with first = (car list-form)         for (s1 s2 . nil) on list-form         if s2 collect (cons s1 s2)         else collect (cons s1 first)))  (defvar cycle-symbols-alist nil   "list of characters used for symbol cycling")  (defgroup cycle-symbols nil   "Group for cycling symbols")  (defcustom cycle-symbols-lists-default   (list (list ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?0) (list ?+ ?-) (list ?> ?< ?=))   "Default lists for symbol cycling"   :type 'sexp   :set (lambda (s val)          (set-default s val)          (setq cycle-symbols-alist (mapcan #'unwrap-list-to-map val))))  (defun krv/cycle-symbols-command ()   "Cycle previous non-whitespace if there is a known substitution"   (interactive)   (let* ((check-pair (krv/last-char-check))          (pos (car check-pair))          (char (cdr check-pair))          (rchar (assoc char cycle-symbols-alist)))     (when (and check-pair rchar)       (forward-char pos)       (delete-backward-char 1)       (insert-char (cdr rchar))       (backward-char pos)))) 

“Please sign in using one of the owner’s previous accounts for this device.”

After resetting my Huawei Honor 8 I’m asked to log into a previously added google account.

I clicked on “I forgot my email” and added my phone number. After this google showed me all the email accounts attached to this phone.

I then tried to log into the account with all of those accounts but I always get the same message: “Please sign in using one of the owner’s previous accounts for this device.”

This phone has always been mine so the account can’t be someone elses.

Adding a second subnet IP to bridge breaks routing of previous subnet

I have a host machine with Proxmox installed on it, hosting several VMs. The host has a NIC and a bridge, and a subnet of 16 public IPs assigned to the bridge, so that each VM and the host itself gets an IP. This is what /etc/network/interfaces looks like:

auto lo iface lo inet loopback  iface eno1 inet manual  auto vmbr0 iface vmbr0 inet static     address XX.XX.XX.2     netmask 255.255.255.240     network XX.XX.XX.0     broadcast XX.XX.XX.15     gateway XX.XX.XX.1     bridge_ports eno1     bridge_stp off     bridge_fd 0  iface eno2 inet manual  iface eno3 inet manual  iface eno4 inet manual   

Now, I want to add a subnet of 8 IPs to the same system, which is on a different subnet, and I want to route these new IPs to some other VMs hosted by Proxmox. I’ve tried adding this:

auto vmbr0:1 allow-hotplug vmbr0:1 iface vmbr0:1 inet static     address YY.YY.YY.18     netmask 255.255.255.248 

And after adding this I run system networking restart. Now, I can ping XX.XX.XX.2 (which is the host itself) and YY.YY.YY.18 (which, again, routes to the host itself) but I can no longer ping any of the VMs that were previously accessible on XX.XX.XX.3 to XX.XX.XX.14, nor any of the newer VMs that were supposed to be accessbile on YY.YY.YY.19 to YY.YY.YY.22.
As a side note, Proxmox doesn’t seem to understand the new IPs of vmbr0, showing it in network section of host as a device with unknown type.
What am I doing wrong?

Debian GNU/Linux 9.6 (stretch)  Proxmox 5.3-5 

trying to destroy all previous session except the current but still destroys all

As mentioned in the question, i’m trying to destroy all previous sessions except the current using destroy_others(wp_get_session_token()) but the function still destroys all and i don’t where the problem is.

In the following i have the _login_count meta key which stores a limit of active logins for a user, which i compare with the count of session tokens, and destroy other sessions if the tokens count is more than the limit set to a user, but it destroys all. what is wrong?

I have set the limit to 2 active logins but once i login third time all previous sessions are destroyed and the third one expires on refresh, which means it deleted all sessions

function lums_only_one_session(){         if(!current_user_can('administrator')){             //get current user id             $  user_id = get_current_user_id();             //get the user login allowed session count             $  _login_count = get_the_author_meta('_login_count', $  user_id);             //get user sessions             $  user_sessions = get_user_meta($  user_id, 'session_tokens', true);             // get login timestamp from all sessions             $  login_timestamps = (!empty($  user_sessions)) ? array_values(wp_list_pluck($  user_sessions, 'login')):array();             //check whether user's session less then the limit specified by the administrator, then continue              if (count($  login_timestamps) <= $  _login_count) {                 //return                 return $  user;             } else {                 //get all active sessions of the user                 $  sessions = WP_Session_Tokens::get_instance($  user_id);                 // we got all the sessions, just destroy them all at once.(remove comment)                 //$  sessions->destroy_all();                  /*Destroy all session tokens for this user,                  * except a single token, presumably the one in use.                  */                 $  sessions->destroy_others(wp_get_session_token());             }         }  }  add_action( 'wp_login', 'lums_only_one_session' );