diff options
Diffstat (limited to 'doc/lispref')
| -rw-r--r-- | doc/lispref/display.texi | 15 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/frames.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 87 |
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 |
| 8442 | When Emacs is built with GTK+ support, it by default displays tooltips | 8442 | When Emacs is built with the GTK+ toolkit or Haiku windowing support, |
| 8443 | using GTK+ functions, and the appearance of the tooltips is then | 8443 | it by default displays tooltips using toolkit functions, and the |
| 8444 | controlled by GTK+ settings. GTK+ tooltips can be disabled by | 8444 | appearance of the tooltips is then controlled by by the toolkit's |
| 8445 | changing the value of the variable @code{x-gtk-use-system-tooltips} to | 8445 | settings. Toolkit-provided tooltips can be disabled by changing the |
| 8446 | @code{nil}. The rest of this subsection describes how to control | 8446 | value of the variable @code{use-system-tooltips} to @code{nil}. The |
| 8447 | non-GTK+ tooltips, which are presented by Emacs itself. | 8447 | rest of this subsection describes how to control non-toolkit tooltips, |
| 8448 | which are presented by Emacs itself. | ||
| 8448 | 8449 | ||
| 8449 | @cindex tooltip frames | 8450 | @cindex tooltip frames |
| 8450 | Tooltips are displayed in special frames called tooltip frames, which | 8451 | Tooltips 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 |
| 3155 | This function lowers frame @var{frame} (default, the selected frame) | 3155 | This function lowers frame @var{frame} (default, the selected frame) |
| 3156 | below all other frames belonging to the same or a higher z-group as | 3156 | below 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}), |
| 3158 | to limitations imposed by the system.} If @var{frame} is a child | 3158 | this lowers @var{frame} below all other child frames of its parent. |
| 3159 | frame (@pxref{Child Frames}), this lowers @var{frame} below all other | ||
| 3160 | child 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 | ||
| 4954 | sites. Attackers may attempt to confuse the user reading this text by | ||
| 4955 | using obfuscated @acronym{URL}s or email addresses, and tricking the | ||
| 4956 | user into visiting a web page they didn't intend to visit, or sending | ||
| 4957 | an email to the wrong address. | ||
| 4958 | |||
| 4959 | This usually involves using characters from scripts that visually look | ||
| 4960 | like @acronym{ASCII} characters (i.e., are homoglyphs), but there are | ||
| 4961 | also other techniques used, like using bidirectional overrides, or | ||
| 4962 | having an @acronym{HTML} link text that says one thing, while the | ||
| 4963 | underlying @acronym{URL} points somewhere else. | ||
| 4964 | |||
| 4965 | @cindex suspicious text strings | ||
| 4966 | To help identify these @dfn{suspicious text strings}, Emacs provides a | ||
| 4967 | library to do a number of checks on text. (See | ||
| 4968 | @url{https://www.unicode.org/reports/tr39/, UTS #39: Unicode Security | ||
| 4969 | Mechanisms} for the rationale behind the checks that are available and | ||
| 4970 | more details about them.) Packages that present data that might be | ||
| 4971 | suspicious should use this library to flag suspicious text on display. | ||
| 4972 | |||
| 4973 | @vindex textsec-check | ||
| 4974 | @defun textsec-suspicious-p object type | ||
| 4975 | This function is the high-level interface function that packages | ||
| 4976 | should use. It respects the @code{textsec-check} user option, which | ||
| 4977 | allows the user to disable the checks. | ||
| 4978 | |||
| 4979 | This function checks @var{object} (whose data type depends on | ||
| 4980 | @var{type}) to see if it looks suspicious when interpreted as a thing | ||
| 4981 | of @var{type}. The available types and the corresponding @var{object} | ||
| 4982 | data types are: | ||
| 4983 | |||
| 4984 | @table @code | ||
| 4985 | @item domain | ||
| 4986 | Check 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 | ||
| 4990 | Check whether an @acronym{URL} (e.g., @samp{http://gnu.org/foo/bar}) | ||
| 4991 | looks suspicious. @var{object} should be a string, the @acronym{URL} | ||
| 4992 | to check. | ||
| 4993 | |||
| 4994 | @item link | ||
| 4995 | Check whether an @acronym{HTML} link (e.g., @samp{<a | ||
| 4996 | href='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 | ||
| 4999 | is deemed suspicious if the link text contains a domain name, and that | ||
| 5000 | domain name points to something other than the @acronym{URL}. | ||
| 5001 | |||
| 5002 | @item email-address | ||
| 5003 | Check whether an email address (e.g., @samp{foo@@example.org}) looks | ||
| 5004 | suspicious. @var{object} should be a string. | ||
| 5005 | |||
| 5006 | @item local-address | ||
| 5007 | Check 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 | ||
| 5011 | Check whether a name (used in an email address header) looks | ||
| 5012 | suspicious. @var{object} should be a string. | ||
| 5013 | |||
| 5014 | @item email-address-header | ||
| 5015 | Check 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 | |||
| 5020 | If @var{object} is suspicious, this function returns a string that | ||
| 5021 | explains why it is suspicious. If @var{object} is not suspicious, the | ||
| 5022 | function returns @code{nil}. | ||
| 5023 | @end defun | ||
| 5024 | |||
| 5025 | @vindex textsec-suspicious@r{ (face)} | ||
| 5026 | If the text is suspicious, the application should mark the suspicious | ||
| 5027 | text with the @code{textsec-suspicious} face, and make the explanation | ||
| 5028 | returned by @code{textsec-suspicious-p} available to the user in some way | ||
| 5029 | (for example, in a tooltip). The application might also prompt the | ||
| 5030 | user 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 |