postgresql/src/include
Heikki Linnakangas 60f11b87a2 Use SASLprep to normalize passwords for SCRAM authentication.
An important step of SASLprep normalization, is to convert the string to
Unicode normalization form NFKC. Unicode normalization requires a fairly
large table of character decompositions, which is generated from data
published by the Unicode consortium. The script to generate the table is
put in src/common/unicode, as well test code for the normalization.
A pre-generated version of the tables is included in src/include/common,
so you don't need the code in src/common/unicode to build PostgreSQL, only
if you wish to modify the normalization tables.

The SASLprep implementation depends on the UTF-8 functions from
src/backend/utils/mb/wchar.c. So to use it, you must also compile and link
that. That doesn't change anything for the current users of these
functions, the backend and libpq, as they both already link with wchar.o.
It would be good to move those functions into a separate file in
src/commmon, but I'll leave that for another day.

No documentation changes included, because there is no details on the
SCRAM mechanism in the docs anyway. An overview on that in the protocol
specification would probably be good, even though SCRAM is documented in
detail in RFC5802. I'll write that as a separate patch. An important thing
to mention there is that we apply SASLprep even on invalid UTF-8 strings,
to support other encodings.

Patch by Michael Paquier and me.

Discussion: https://www.postgresql.org/message-id/CAB7nPqSByyEmAVLtEf1KxTRh=PWNKiWKEKQR=e1yGehz=wbymQ@mail.gmail.com
2017-04-07 14:56:05 +03:00
..
access Fix BRIN cost estimation 2017-04-06 17:51:53 -03:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Mark immutable functions in information schema as parallel safe 2017-04-06 14:30:13 -04:00
commands Identity columns 2017-04-06 08:41:37 -04:00
common Use SASLprep to normalize passwords for SCRAM authentication. 2017-04-07 14:56:05 +03:00
datatype Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
executor Identity columns 2017-04-06 08:41:37 -04:00
fe_utils Allow psql variable substitution to occur in backtick command strings. 2017-04-01 21:44:54 -04:00
foreign Allow custom and foreign scans to have shutdown callbacks. 2017-02-26 13:41:12 +05:30
lib Support hashed aggregation with grouping sets. 2017-03-27 04:20:54 +01:00
libpq Allow SCRAM authentication, when pg_hba.conf says 'md5'. 2017-03-24 13:32:21 +02:00
mb ICU support 2017-03-23 15:28:48 -04:00
nodes Comment fixes for extended statistics 2017-04-06 12:28:50 -03:00
optimizer Reset API of clause_selectivity() 2017-04-06 19:10:51 -04:00
parser Identity columns 2017-04-06 08:41:37 -04:00
port Enable 64 bit atomics on ARM64. 2017-03-10 11:19:54 -08:00
portability Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Make header self-contained 2017-04-03 16:17:45 -04:00
regex Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
replication Cleanup slots during drop database 2017-03-28 10:05:21 -04:00
rewrite Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05:00
snowball Document intentional violations of header inclusion policy. 2017-03-08 17:01:13 -05:00
statistics Collect and use multi-column dependency stats 2017-04-05 18:00:42 -04:00
storage Remove direct uses of ItemPointer.{ip_blkid,ip_posid} 2017-03-28 19:02:23 -03:00
tcop Remove dead code and fix comments in fast-path function handling. 2017-04-06 09:09:39 +03:00
tsearch Full Text Search support for json and jsonb 2017-03-31 14:26:03 -04:00
utils Allow avoiding tuple copy within tuplesort_gettupleslot(). 2017-04-06 14:48:59 -07:00
.gitignore
c.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
fmgr.h Remove support for version-0 calling conventions. 2017-03-30 06:25:46 -07:00
funcapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getaddrinfo.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getopt_long.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
miscadmin.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_config_ext.h.in
pg_config_ext.h.win32
pg_config_manual.h Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_config.h.in Cast result of copyObject() to correct type 2017-03-28 21:59:23 -04:00
pg_config.h.win32 Fix hardcoded typeof check result for Windows 2017-03-29 08:55:34 -04:00
pg_getopt.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_trace.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgstat.h Show more processes in pg_stat_activity. 2017-03-26 22:02:22 -04:00
pgtar.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtime.h Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based. 2017-01-24 09:36:17 -05:00
port.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres_ext.h Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
postgres_fe.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres.h Recommend wrappers of PG_DETOAST_DATUM_PACKED(). 2017-03-12 19:35:33 -04:00
rusagestub.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00