aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/display.texi15
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/frames.texi6
-rw-r--r--doc/lispref/text.texi87
4 files changed, 98 insertions, 11 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 12e19efab0e..9020b98a1eb 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -8438,13 +8438,14 @@ displayed in the echo area.
8438@end defun 8438@end defun
8439 8439
8440@cindex system tooltips 8440@cindex system tooltips
8441@vindex x-gtk-use-system-tooltips 8441@vindex use-system-tooltips
8442When Emacs is built with GTK+ support, it by default displays tooltips 8442When Emacs is built with the GTK+ toolkit or Haiku windowing support,
8443using GTK+ functions, and the appearance of the tooltips is then 8443it by default displays tooltips using toolkit functions, and the
8444controlled by GTK+ settings. GTK+ tooltips can be disabled by 8444appearance of the tooltips is then controlled by by the toolkit's
8445changing the value of the variable @code{x-gtk-use-system-tooltips} to 8445settings. Toolkit-provided tooltips can be disabled by changing the
8446@code{nil}. The rest of this subsection describes how to control 8446value of the variable @code{use-system-tooltips} to @code{nil}. The
8447non-GTK+ tooltips, which are presented by Emacs itself. 8447rest of this subsection describes how to control non-toolkit tooltips,
8448which are presented by Emacs itself.
8448 8449
8449@cindex tooltip frames 8450@cindex tooltip frames
8450Tooltips are displayed in special frames called tooltip frames, which 8451Tooltips are displayed in special frames called tooltip frames, which
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 91926e05794..426bb6d0176 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1231,6 +1231,7 @@ Text
1231* Decompression:: Dealing with compressed data. 1231* Decompression:: Dealing with compressed data.
1232* Base 64:: Conversion to or from base 64 encoding. 1232* Base 64:: Conversion to or from base 64 encoding.
1233* Checksum/Hash:: Computing cryptographic hashes. 1233* Checksum/Hash:: Computing cryptographic hashes.
1234* Suspicious Text:: Determining whether a string is suspicious.
1234* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS. 1235* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS.
1235* Database:: Interacting with an SQL database. 1236* Database:: Interacting with an SQL database.
1236* Parsing HTML/XML:: Parsing HTML and XML. 1237* Parsing HTML/XML:: Parsing HTML and XML.
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index ca7d9ada0ba..2eeb8b7ed74 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -3154,10 +3154,8 @@ raises @var{frame} above all other child frames of its parent.
3154@deffn Command lower-frame &optional frame 3154@deffn Command lower-frame &optional frame
3155This function lowers frame @var{frame} (default, the selected frame) 3155This function lowers frame @var{frame} (default, the selected frame)
3156below all other frames belonging to the same or a higher z-group as 3156below all other frames belonging to the same or a higher z-group as
3157@var{frame}.@footnote{Lowering frames is not supported on Haiku, due 3157@var{frame}. If @var{frame} is a child frame (@pxref{Child Frames}),
3158to limitations imposed by the system.} If @var{frame} is a child 3158this lowers @var{frame} below all other child frames of its parent.
3159frame (@pxref{Child Frames}), this lowers @var{frame} below all other
3160child frames of its parent.
3161@end deffn 3159@end deffn
3162 3160
3163@defun frame-restack frame1 frame2 &optional above 3161@defun frame-restack frame1 frame2 &optional above
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index b9df66dbdb4..37cf376bd53 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -59,6 +59,7 @@ the character after point.
59* Decompression:: Dealing with compressed data. 59* Decompression:: Dealing with compressed data.
60* Base 64:: Conversion to or from base 64 encoding. 60* Base 64:: Conversion to or from base 64 encoding.
61* Checksum/Hash:: Computing cryptographic hashes. 61* Checksum/Hash:: Computing cryptographic hashes.
62* Suspicious Text:: Determining whether a string is suspicious.
62* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS. 63* GnuTLS Cryptography:: Cryptographic algorithms imported from GnuTLS.
63* Database:: Interacting with an SQL database. 64* Database:: Interacting with an SQL database.
64* Parsing HTML/XML:: Parsing HTML and XML. 65* Parsing HTML/XML:: Parsing HTML and XML.
@@ -4943,6 +4944,92 @@ It should be somewhat more efficient on larger buffers than
4943@c according to what we find useful. 4944@c according to what we find useful.
4944@end defun 4945@end defun
4945 4946
4947@node Suspicious Text
4948@section Suspicious Text
4949@cindex suspicious text
4950@cindex insecure text
4951@cindex security vulnerabilities in text
4952
4953 Emacs can display text from many external sources, like email and Web
4954sites. Attackers may attempt to confuse the user reading this text by
4955using obfuscated @acronym{URL}s or email addresses, and tricking the
4956user into visiting a web page they didn't intend to visit, or sending
4957an email to the wrong address.
4958
4959This usually involves using characters from scripts that visually look
4960like @acronym{ASCII} characters (i.e., are homoglyphs), but there are
4961also other techniques used, like using bidirectional overrides, or
4962having an @acronym{HTML} link text that says one thing, while the
4963underlying @acronym{URL} points somewhere else.
4964
4965@cindex suspicious text strings
4966To help identify these @dfn{suspicious text strings}, Emacs provides a
4967library to do a number of checks on text. (See
4968@url{https://www.unicode.org/reports/tr39/, UTS #39: Unicode Security
4969Mechanisms} for the rationale behind the checks that are available and
4970more details about them.) Packages that present data that might be
4971suspicious should use this library to flag suspicious text on display.
4972
4973@vindex textsec-check
4974@defun textsec-suspicious-p object type
4975This function is the high-level interface function that packages
4976should use. It respects the @code{textsec-check} user option, which
4977allows the user to disable the checks.
4978
4979This function checks @var{object} (whose data type depends on
4980@var{type}) to see if it looks suspicious when interpreted as a thing
4981of @var{type}. The available types and the corresponding @var{object}
4982data types are:
4983
4984@table @code
4985@item domain
4986Check whether a domain (e.g., @samp{www.gnu.org} looks suspicious.
4987@var{object} should be a string, the domain name.
4988
4989@item url
4990Check whether an @acronym{URL} (e.g., @samp{http://gnu.org/foo/bar})
4991looks suspicious. @var{object} should be a string, the @acronym{URL}
4992to check.
4993
4994@item link
4995Check whether an @acronym{HTML} link (e.g., @samp{<a
4996href='http://gnu.org'>fsf.org</a>} looks suspicious. In this case,
4997@var{object} should be a @code{cons} cell where the @code{car} is the
4998@acronym{URL} string, and the @code{cdr} is the link text. The link
4999is deemed suspicious if the link text contains a domain name, and that
5000domain name points to something other than the @acronym{URL}.
5001
5002@item email-address
5003Check whether an email address (e.g., @samp{foo@@example.org}) looks
5004suspicious. @var{object} should be a string.
5005
5006@item local-address
5007Check whether the local part of an email address (the bit before the
5008@samp{@@} sign) looks suspicious. @var{object} should be a string.
5009
5010@item name
5011Check whether a name (used in an email address header) looks
5012suspicious. @var{object} should be a string.
5013
5014@item email-address-header
5015Check whether a full RFC2822 email address header (e.g.,
5016@samp{=?utf-8?Q?=C3=81?= <foo@@example.com>}) looks suspicious.
5017@var{object} should be a string.
5018@end table
5019
5020If @var{object} is suspicious, this function returns a string that
5021explains why it is suspicious. If @var{object} is not suspicious, the
5022function returns @code{nil}.
5023@end defun
5024
5025@vindex textsec-suspicious@r{ (face)}
5026If the text is suspicious, the application should mark the suspicious
5027text with the @code{textsec-suspicious} face, and make the explanation
5028returned by @code{textsec-suspicious-p} available to the user in some way
5029(for example, in a tooltip). The application might also prompt the
5030user for confirmation before taking any action on a suspicious string
5031(like sending an email to a suspicious email address).
5032
4946@node GnuTLS Cryptography 5033@node GnuTLS Cryptography
4947@section GnuTLS Cryptography 5034@section GnuTLS Cryptography
4948@cindex MD5 checksum 5035@cindex MD5 checksum