I'm currently building a small website with no real backend using vue-cli. As I'm a real potatoe when it comes to php (and backend in general), I was wondering how secure was my contact form on this website, and what to do if it's not secure enough. To summarize, I'm making a fetch() call from my vue app to a mail.php file on my server. This mail.php file uses PHPMailer to send an email from one of my domain's email addresses to another of my addresses. And up to now it works fine. Here is my JS related to sending mail :   sendMail () {     this.sendRequest()       .then(r =&gt; {         if (r.mailSent === 'ok') {           // mail sent callback         }       })   },   async sendRequest () {     const response = await fetch('./mail.php', {       method: 'post',       headers: {         'content-type': 'application/json'       },       body: JSON.stringify({         subject: 'Message de ' + this.firstNameInput + ' ' + this.lastNameInput + ' via mysite.com',         body: '&lt;html&gt;' +           '&lt;body&gt;' +           '&lt;p&gt;De : ' + this.firstNameInput + ' ' + this.lastNameInput + '&lt;/p&gt;' +           '&lt;p&gt;Email : ' + this.mailInput + '&lt;/p&gt;' +           '&lt;p&gt;Message :&lt;br&gt;' + this.messageInput.replace(/\n/g, '&lt;br&gt;') + '&lt;/p&gt;' +           '&lt;/body&gt;' +           '&lt;/html&gt;',         altBody: 'De : ' + this.firstNameInput + ' ' + this.lastNameInput + ' /// Email : ' + this.mailInput + ' /// Message :' + this.messageInput       })     })     return response.json()   }  And here is the content of my mail.php file : &lt;?php  use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception;  require './PHPMailer/src/Exception.php'; require './PHPMailer/src/PHPMailer.php'; require './PHPMailer/src/SMTP.php';  header('Content-Type: application/json');  include './mailSettings.php'; // contains $site, $mailFrom, $mailTo, $senderName and $recipientName  if(@isset($_SERVER['HTTP_REFERER']) &amp;&amp; $_SERVER['HTTP_REFERER'] == $site) {   $contentType = isset($_SERVER[&quot;CONTENT_TYPE&quot;]) ?trim($_SERVER[&quot;CONTENT_TYPE&quot;]) : '';    if ($contentType === &quot;application/json&quot;) {     $content = stripslashes(trim(file_get_contents(&quot;php://input&quot;)));     $decoded = json_decode($content, true);      if(!is_array($decoded)) {       echo '{&quot;status&quot;:&quot;error&quot;}';     } else {       $mail = new PHPMailer(TRUE);       try {         $mail-&gt;setFrom($mailFrom, $senderName);         $mail-&gt;addAddress($mailTo, $recipientName);         $mail-&gt;Subject = $decoded['subject'];         $mail-&gt;isHTML(TRUE);         $mail-&gt;Body = $decoded['body'];         $mail-&gt;AltBody = $decoded['altBody'];         $mail-&gt;send();       }       catch (Exception $e) {         echo $e-&gt;errorMessage();       }       catch (\Exception $e) {         echo $e-&gt;getMessage();       }       echo '{ &quot;mailSent&quot;: &quot;ok&quot;}';     }   } else {     echo '{&quot;status&quot;:&quot;error&quot;}';   } } else {   echo '{&quot;status&quot;:&quot;no call accepted from this adress&quot;}'; } ?&gt;  I guessed that I still have stuff to do in order to make this secure, but can you guys help me find out what and why ?
Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags?
Compute the radius of convergence of the power series $\sum_{n=0}^{\infty} n!x^n$ How does an Intelligence penalty affect skill points when character-building/leveling-up? Securely erasing all data from a hard drive I've a Skype interview for PhD application (it will make me miss  today.) I've been asked, in advance, to prepare a short presentation and then there would be some discussion with the panel (I guess.) I expect that they will ask if I have some questions so, I'm wondering what are the best (type of) questions one might consider? Custom action to set emblem in thunar Suppose I have two tables that don't have many columns (3, for example). How can I position them side by side? What to do when witches appear early in the game? How is floating point stored? When does it matter? In follow up to , it appears that some numbers cannot be represented by floating point at all, and instead are approximated.  How are floating point numbers stored?  Is there a common standard for the different sizes?  What kind of gotchas do I need to watch out for if I use floating point?  Are they cross-language compatible (ie, what conversions do I need to deal with to send a floating point number from a python program to a C program over TCP/IP)? AF mirror not flipping on Canon 350D My Canon 350D is no longer raising the AF mirror when it takes a photo.  Instead, it looks like this when the mirror flips up.   This results in a photo that is half black due to the sensor being obscured.  This camera is 9 years old and has never been dropped, mishandled or subjected to harsh temperature or humidity.  Is there any common maintenance I can do to get this thing swinging properly again? Unable to install "quickly" on Ubuntu GNOME 15.10 When running:  sudo apt-get install quickly   To install quickly I get this output:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package quickly   Why the error and how can I install it then? I lost the source code from one project I did on the company I'm working for and haven't been able to find a Visual Basic 6 decompiler; does that even exists?  I only have the EXE that I've rescued from a user's machine. Do characters provoke opportunity attack when they leave another character's reach who is not facing them? "You can make an opportunity attack when a hostile creature that YOU CAN SEE moves out of your reach."   In 5E do you have to specify which way your character is facing at all times?  If an enemy who is behind him leaves melee range but his back is to him does that enemy provoke an opportunity attack?    Are enemies within five feet and 360 degrees of a character considered to be within reach?  For example... Kruska and Atone are attacking Dip.  Dip is facing or only attacking Kruska.    Then Atone moves out of Dip's reach (melee range 5 feet) to engage a silly looking wizard.    Does Atone's move provoke an opportunity attack from Dip even though he's not facing him?  Is he assumed to be able to see him? Validationengine jquery not working properly for localization All the info about TLP on the surface looks more like advertisement and marketing to me, I can't see any detailed comparison to default configurations. What are the precise differences compared to default (K/L)Ubuntu installs under the hood, are they really effective?  Update: And if they really are, why aren't they a part of a default config? Sequence converges iff $\limsup = \liminf$ I want to prove that a sequence of real numbers $\{s_n\}$ converges to $s$ if and only if $\limsup_{n \to \infty} s_n = \liminf_{n \to \infty} s_n = s$.  Here are my definitions:  For any sequence of real numbers $\{s_n\}$, let $E$ be the set of all subsequential limits of $\{s_n\}$, including possibly $+\infty$ and/or $-\infty$ if any subsequence of $\{s_n\}$ diverges to infinity.  Then $\limsup_{n \to \infty} s_n = \sup E$, and $\liminf_{n \to \infty} s_n = \inf E$.  I know the theorem that a sequence converges to a point if and only if every one of its subsequences converge to that same point, so one direction of this proof is easy:  If $\{s_n\}$ converges to some point $s \in \mathbb{R}$,  then every subsequence of $\{s_n\}$ converges to $s$.  So the set $E$ of every subsequential limit of $\{s_n\}$ consists of the single point $s$, so $$\limsup_{n \to \infty} s_n = \sup \{s\} = s = \inf \{s\} = \liminf_{n \to \infty} s_n$$  But the other direction seems more tricky...  If $\limsup_{n \to \infty} s_n = \liminf_{n \to \infty} s_n = s$, then every convergent subsequence converges to the same point $s$.  Also, there can be no subsequences which diverge to infinity (otherwise $\limsup_{n \to \infty} s_n$ would be $+\infty$, or $\liminf_{n \to \infty} s_n$ would be $-\infty$).  But can't there be subsequences which diverge otherwise?  And wouldn't that throw off the convergence of $\{s_n\}$?    EDIT:  I'd also be willing to accept a solution which makes use of the "Pinching Theorem" (if $a_n \leq s_n \leq b_n$ for every $n \in \mathbb{N}$, and if $a_n \to s$ and $b_n \to s$, then $s_n \to s$). How to add new item in existing string array in C#.net?  I need to preserve the existing data. Integral solutions of hyperboloid $x^2+y^2-z^2=1$ Are there integral solutions to the equation $x^2+y^2-z^2=1$? If you shine a light away from the center of a Schwarzchild black hole, will it stay still? $$ A $$  Light is travelling away from the absolute center of the Schwarzchild black hole (i.e. none of that spinning/stretching field) at $\ C $, and so shouldn't $\ \Delta C$ need to be greater than $\ C $ in order for the light to collapse into the black hole, therefore violating the relativistic limit of $\ C $?    It seems like light would just 'hover' right in the center of a black hole then. Because if it goes away from it, the event horizon pulls it back, and if it goes into it, the velocity change must be greater than $\ C $ which violates general relativity; so technically there's no way for the light to move away, and so it would just be still.  The thing is that the light must move at the speed of light or general relativity doesn't work. It's massless... But in the center of a black hole, if the above is true (it can't move or escape), then it is not travelling at the speed of light. So it cannot be still.  It cannot be spinning in a constant orbit either, because that would require velocity in an outward angle. And it cannot move in an outwardly fashion, only in an inwardly one.  Is it spinning in an infinitely decaying spiral towards the center?  If so what happens to it if and when it reaches the direct and complete center, i.e. The case of it being 'shot' from the center.    $$ B $$  If you shot light at an angle towards a black hole, but not directly to the center of it  then that light from the outside will eventually become the same as the light that I said was shot from the center to the outside; because in both cases, they end up in an infinitely decaying spiral.    If so it would end up exactly like the light in the above paragraph, so then we need to figure out what happens to that light to figure this one out, or vice versa.    $$ C $$  If you shot light directly towards the center of a black hole it would have no spiral to decay into, so therefore it must stop at some point in the center of a black hole. If it stops though, it loses it's momentum and violates general relativity again because it's energy "disappears".    If so then it violates conservation laws. So I'm assuming this simply is not true.    Is the light travelling into a black hole somehow still travelling at the speed of light, in every direction possible where that direction keeps it facing towards the center?  If so, why is there not a point at which the only thing left for the light to do is stay still, since all other paths would increase the distance between it and the black hole's center, and therefore become Case A. And if there isn't, what would happen if there was?  Also, if it's a time and observation answer where it supposedly takes and infinite amount of time for C to hit the center, wouldn't it be the case that the black hole is 'eating' all of the available light in the universe and keeping it in stasis?  Also, what happens in a Kerr black hole then? Does it just rip the field of time/gravity at an angle such that the light would never get closer than the center? Compiling with either XeLaTeX or LuaLaTeX, \emph{} no longer displays text as expected, i.e. in italics. \textit{} works fine. Here is a MWE demonstrating the issue.  \documentclass{article}  \usepackage{fontspec}  \begin{document}      \emph{lorem ipsum}      \textit{lorem ipsum}  \end{document}   Here is the output I get :   I have TeXLive 2016 (MacTeX) installed. I updated it an hour ago with sudo tlmgr update --self --all.  I guess there is something wrong but what ? I'd be happy to have some help. Thank you. Texture Channel animated, doesn't appear in viewport I'm creating an educational video, and for efficiency, I'm using a Cyclic repeater to repeat an on-page/off-page effect.  Every loop, I have the texture channel switch to the next image, rather than duplicating all the objects/animations. This works properly and appears when rendering the animation, but does not appear in the viewport. It sticks to the original UV image that was mapped.  Is there a way to have this change appear in the viewport?