Does Log File contain both committed and uncommitted transactions?

My question is related to SQL Server architecture. Mainly log file. In the picture below it says that when transaction is committed, log record in LOG CACHE will be moved to Log file. Does it mean that Log file contains only committed transactions?

Some sites also state that when COMMIT happens, then dirty page is moved from BUFFER CACHE into LOG CACHE first and afterwards into log file. So I do not understand what happens when COMMIT occurs. I will appreciate any help.

enter image description here

Security risks of file shares vs ssh or sftp, in “backward” direction?

I work for a municipal government, using mostly Windows servers. In recent days several similar governments in our geographic area have been attacked, some successfully, by ransomware. So our security folks are alarmed, and have decreed (among other things) no more using SMB file-sharing to upload files from the “internal” network to the DMZ. I have a PowerShell script that does just that, to migrate databases; plus we have many other cases to use file shares such as uploading web sites.

They are saying we need to convert to using SSH or SFTP to transfer files. OK, this would be possible, but it would need setup work on every DMZ server, and changing all our current processes, and for what? (We don’t have enough people to do that plus everything else, although we’ve tried to get more warm bodies budgeted.) Anyway I don’t see how that’s more secure. If DMZ server D is listening on a share, and the firewall prevents access from anywhere but authorized internal workstations or servers A, B, and C, then how can that be any more a security risk (specifically, the risk of malware on server D going back the other way and compromising A, B, or C) than server D listening on an SFTP port or an SSH port, with the same firewall restrictions?

If the issue is something like “the file share is open all the time, but SSH isn’t,” then that would be somewhat understandable, and we might deal with that by mapping and unmapping to the shares when needed. But I don’t think this is their reasoning; I think it’s something else. Actually I get the impression it’s kind of a vague “feeling” on their part, that file shares are inherently and materially less secure, in the “backward” direction, even if firewall-protected as described above. If this is actually so, then why? I just don’t see it. Actually I don’t see why any of those protocols would pose a risk in the “backward” direction.

Validar capo input de type file en javascript

estoy implementando un sistema de registro de mascotas, dentro del formulario también debe de enviar la foto de la mascota, me gustaría me ayuden con el código para validar que input no vaya vacío y que me debe de enviar un mensaje de error, también validar el tipo de archivos a subir como .jpg. png. Gracias.

<div class="alert alert-danger d-none" id="mensajeErrorFotoReg">                 Debe de seleccionar una foto de la mascota  </div>   <div class="form-row">                 <div class="form-group col-12 col-md-12">                   <label for="foto-can">Foto de la mascota</label>                   <div class="custom-file">                     <input                       data-toggle="tooltip"                       data-placement="bottom"                       title="Este campo es obligatorio"                       type="file"                       class="custom-file-input"                       id="fotoMascotaRegistra"                     />                     <label                       class="custom-file-label"                       for="customFileLangHTML"                       data-browse="Elegir archivo"                       >* Seleccionar una foto</label                     >                   </div>                 </div>               </div>  function fotoMascoRegis()   var mensajeErrorFotoReg = document.getElementById("mensajeErrorFotoReg");  mensajeErrorFotoReg.classList.remove("d-none"); }; 

The remote server returned an error: (401) Unauthorized: While uploading file in document library using App Based Token Authentication

I am trying to upload a document to the document library using App Based Token authentication in SharePoint Online.

I have referred following link to set up the App Based token and the token successfull worked when I try to read any thing from the site.

But when I try to upload a file using following code,

string file = @"Path Of the file"; System.IO.FileStream fs = new System.IO.FileStream(file, System.IO.FileMode.Open, System.IO.FileAccess.Read); using (var ctx = new AuthenticationManager().GetAppOnlyAuthenticatedContext(siteUrl, "CLIENTID","CLIENTSECRET")) {     try     {         ctx.Load(ctx.Web, p => p.Title);                      ctx.ExecuteQuery();                         Console.WriteLine(ctx.Web.Title);                      Microsoft.SharePoint.Client.File.SaveBinaryDirect(ctx, "RelativePathToDocumentLibrary" + "/test.docx", fs, false);                 }                 catch (Exception ex)                 {                 } } 

It gives me error of

{“The remote server returned an error: (401) Unauthorized.”}

Any suggestion or reference link is most welcome.

Rsync echoes back changed file name but does not copy it

This is my first time using rsync. I studied the command line options and chose the ones that fit my situation.

I have two servers at different IP addresses. Here’s my command string:

rsync -avrtu -e ssh /var/www/html root@xxx.xx.xx.xxx:/var/www/html 

where the x’s represent the remote IP address. I tested with one file with a new timestamp (but the file size is the same as before). Putty echoed back the file name that had changed but it did not transfer it.

Here is what Putty echoed back:

sending incremental file list html/abcde.htm  sent 12,919 bytes  received 397 bytes  1,401.68 bytes/sec total size is 8,909,156 speedup is 669.06 

What about my command line options (avrtu) causes the file to be recognized but not copied to the other server?

I’m running Ubuntu 18.04.

Thanks for any help. Like I said, this is my first time with rsync.