Compile most likely text based on faulty snippets

Input: Recognized text from images of labels taken with a cell phone in varying conditions. One image may enclose the entire text, or just a part of it.

Expected output: The most likely version of the original text, ideally with an indication of the certainty. More images will of course provide better results.

Even though it seems to me that this should be a rather common problem, I could not find any research, algorithms or code directly related.

My best idea so far (after three or four attempts of an implementation now discarded for various reasons…) was to find the best matches for various inputs, potentially by finding the longest common substrings, and then generate some sort of tree indicating the most frequent connections between individual characters. Parsing the tree should then return the most likely original. Even though this might work in principle, it’s always in the details, and there may be much more efficient solutions out there.

Thanks

What’s the best way to encrypt and store text in a MongoDB database?

I have a "cloud service", which consists of 2 parts:

  • Web application, written in Next.js;
  • MongoDB database (uses MongoDB Atlas).

I allow users to sign in with GitHub and handle authentication using JWT. User can create & delete text files, which are saved in the database as so:

{     "name": string,     "content": string,     "owner": number    <-- User ID } 

I would like to encrypt the content so that I can’t see it in the database. I was thinking about using the Web Crypto API, but I’m not sure how I’m going to store the encryptions/decryption key securely.

What’s the best way to handle this case and which encryption algorithm should I use?

Right percent on the anchor text!

Hello! If anyone could address me how to set up the right % on the partial match anchor text, branding, generic, etc. It have to be in total 100 % right? I been using senuke for a few months now and they told me the generics need to go at 80% so Im a bit lost here. 
An screenshot of the right set up would be super great!

Passing plain text password over HTTPS

My login for POST is over HTTPS. Therefore, I don’t do anything to the provided password before submitting. And I don’t see an issue there unless someone is watching your browser’s developer console. (Tested the Google login. They also share the same approach.)

But I’ve received a concern asking "malicious user succeeds in session hijacking in someway will be able to access the end user credentials". Is this a valid argument? if so, how can I act?

How to make “formats” dropdown apply to only the selected text?

How can I make the format styles dropdown in the classic editor apply to ONLY the selected text? Right now it is applying to the nearest line break from the selected text, I don’t like that.

Here is the code in my functions.php file:

function add_style_select_buttons( $  buttons ) {     array_unshift( $  buttons, 'styleselect' );     return $  buttons; } // Register our callback to the appropriate filter add_filter( 'mce_buttons_2', 'add_style_select_buttons' ); //add custom styles to the WordPress editor function my_custom_styles( $  init_array ) {        $  style_formats = array(           // These are the custom styles         array(               'title' => 'Fancy Words',               'block' => 'div',               'classes' => 'fancywords',             'wrapper' => true,         )     );       // Insert the array, JSON ENCODED, into 'style_formats'     $  init_array['style_formats'] = json_encode( $  style_formats );        return $  init_array;    }  // Attach callback to 'tiny_mce_before_init'  add_filter( 'tiny_mce_before_init', 'my_custom_styles' ); 

Why are DNS prefetch requests sent in clear text with DNS over HTTPS enabled?

I am trying to understand how DNS-over-HTTPS (DoH) works in both Chrome and Firefox browsers.

To do so, I have enabled DoH on each browser and set the DNS provider to Cloudflare DNS servers (1.1.1.1 and 1.0.0.1), at both browser and operating system level (Windows 10 in my case).

However, the traffic captured by Wireshark shows that there are still multiple DNS request that are made in clear text:

clear text DNS requests

While some of those requests are probably issued by other desktop applications that do not implement DoH, there is one request pattern which seems strange to me:

DNS Prefetch request

Everytime I search some text (say foo for example) in the URL search bar and press Enter, a DNS request is made to the Cloudflare resolver with the domain name foo.lan. Unsurprisingly, the server answers with a No such name DNS response.

After doing some research, this behaviour actually appears to be linked with DNS prefetching.

To make sure of that, I disabled the DNS prefetch flags in both Firefox (network.dns.disablePrefetch) and Chrome (Use a prediction service to load pages more quickly option toggled off), but the prefetch requests are still being sent as before.

This raises three questions to me:

  • Why DNS prefetch requests still occur when the feature is disabled ?
  • Why are those requests made with the .lan suffix ?
  • Why DNS prefetch requests are sent in clear text even though DoH is enabled ?

Please note that I have also tried to change the default search engine from Google to Bing, but the results are unchanged.

Any help would be very appreciated.

Can a structured (text) document be effectively encrypted

My situation:

I want to encrypt an HTML document. My question is, if the following is known, is that going to weaken encryption?

  • It is a text-based document
  • It starts with <DOCTYPE HTML> or a few variants of
  • This is followed by an <HTML> tag, followed by a <HEAD> tag, which contains a number of ‘

Would this knowledge help a hacker to decrypt without the decrypt key? Would such knowledge make my documents effectively un-encryptable?

My apologies if this is a very simple question. I am a neophyte.