Commit Graph

  • 83733174fe The fullwrite function should never have a NULL buffer. Make it so! By schwarze@---thanks! kristapsdz 2017-11-19 04:31:47 +00:00
  • 2777d52323 Catch allocation failures as noted by schwarze@. Thanks! kristapsdz 2017-11-19 04:24:26 +00:00
  • 78d6147aac The various RFCs are silent as to whether we can have empty values within the query string. Let them through. Also add a regression test for the same. kristapsdz 2017-11-19 03:56:39 +00:00
  • 6a85f3a4cc As noted by schwarze@, we're protected from NULL buffers, so don't check for them redundantly. Thanks! kristapsdz 2017-11-19 03:40:34 +00:00
  • 5e7d64fdeb Better warning messages. kristapsdz 2017-11-19 03:22:46 +00:00
  • ebbffb5d91 Allow for spaces before the "=" in MIME header subparts. Also allow for spaces before the ";" following each MIME header subpart. Both of these noted by schwarze@---thanks! While here, enforce that subparts are connected to a specific kind of MIME field. kristapsdz 2017-11-19 03:15:44 +00:00
  • c83484d6bd Failure to strdup should lead to exit. kristapsdz 2017-11-19 02:44:47 +00:00
  • b13d98b800 RFC 822 allows for space before the colon in a MIME header. However, later RFCs don't, but explicitly note that obsolete syntax should be supported. Thus, strip away whitespace before the colon. Noted by schwarze@, thanks! While here, put mime_free in the correct place. kristapsdz 2017-11-19 02:40:58 +00:00
  • b37ee382c9 Replace nil -> NUL as noted by schwarze@---thanks! kristapsdz 2017-11-19 01:16:58 +00:00
  • 0bcebdc76a Move mime_free into mime_parse and remove a superfluous memset. Noted by schwarze@---thanks! kristapsdz 2017-11-19 01:13:25 +00:00
  • e96f7f5f71 Possibly read after buffer boundary found by schwarze@---thanks! While here clarify some warning messages. kristapsdz 2017-11-19 00:17:09 +00:00
  • 553676e193 Fix a bug found by schwarze@: if we have white-space between the trailing boundary marker and the CRLF, we might read after the end of our buffer. While here, add some normalising white-space and fix up warning messages to be more meaningful. kristapsdz 2017-11-18 13:20:13 +00:00
  • be6190cbc5 Use XASPRINTF instead of asprintf as noted by schwarze@---thanks! kristapsdz 2017-11-18 11:24:12 +00:00
  • d017a98eee Declare a stack variable instead of re-purposing an unusued parameter and also mention why we're not warning about trailing garbage. Both of these noted by schwarze@---thanks! kristapsdz 2017-11-18 11:03:40 +00:00
  • f1c2a37f7d As correctly noted by schwarze@, use the proper function for this loop. Thanks! kristapsdz 2017-11-18 10:40:05 +00:00
  • 01aa9814a6 As noted by schwarze@, add in warnings for RFC violations. Thanks! kristapsdz 2017-11-18 10:34:40 +00:00
  • 96af27cfa3 Add kjson_putintstrp and kjson_putintstr for formatting integer as a string. This is due to JavaScript's limitations. kristapsdz 2017-11-18 10:33:52 +00:00
  • aeb5a6c79d Enlarge font by default. kristapsdz 2017-10-31 01:33:35 +00:00
  • 1d9757052e Version notes. kristapsdz 2017-10-31 01:28:16 +00:00
  • b0954b4154 Sync oconfigure. kristapsdz 2017-10-31 01:27:54 +00:00
  • ec77a644b3 Improve language. kristapsdz 2017-10-31 01:27:43 +00:00
  • 24f585e2de Clarify bit mask not bit index. kristapsdz 2017-10-30 21:18:14 +00:00
  • 453448cf0d Add a kvalid_bit validator that checks for integers between 0 and 63, inclusive. This handles the common situation of a multi-select field representing a bit-mask. kristapsdz 2017-10-29 19:23:07 +00:00
  • 48dd6648fb Forgot kutil_openlog function. kristapsdz 2017-10-19 23:36:27 +00:00
  • 74ec0e2506 Sync with oconfigure. kristapsdz 2017-10-18 23:09:10 +00:00
  • bae2c0bba4 Allow sharedir to propogate. kristapsdz 2017-10-18 23:07:36 +00:00
  • dc39123d3a Notes about using oconfigure. kristapsdz 2017-10-18 22:37:33 +00:00
  • 06593595df Use defaults produced by Makefile.configure. kristapsdz 2017-10-18 22:08:24 +00:00
  • 9a986ad759 Require bsd/stdlib when we don't have arc4random. kristapsdz 2017-10-18 22:07:37 +00:00
  • f1fa91dd75 Sync with oconfigure. kristapsdz 2017-10-18 22:07:15 +00:00
  • 07c8a6b00b More ifndef -> if. kristapsdz 2017-10-18 21:51:20 +00:00
  • 00a4376dcf Add a MD5Updatec macro to avoid type warnings. kristapsdz 2017-10-18 21:51:05 +00:00
  • ee1d5d6c70 Sync with oconfigure. kristapsdz 2017-10-18 21:50:17 +00:00
  • 08c108e70b ifndef -> if kristapsdz 2017-10-18 21:47:14 +00:00
  • a98d2035cd ifdef -> if kristapsdz 2017-10-18 21:45:43 +00:00
  • 685abdeced Full switch to oconfigure instead of current system, so remove all of the test and compat files. These are now in tests.c and compats.c, and driven by the configure script. Also remove the MD5 code, which is part of compats.c. Lastly, move ifdefs to ifs, remove defined (same), and also remove HAVE_CONFIG_H. kristapsdz 2017-10-18 21:36:59 +00:00
  • ec33b975f3 Adding tutorial.css. kristapsdz 2017-10-18 20:47:49 +00:00
  • 56dbc70bdb Add version notes. Here we go... kristapsdz 2017-10-18 20:22:19 +00:00
  • 018739943e Follow schwarze@'s suggestions on the description for "key" and "val". Thanks! kristapsdz 2017-10-18 20:17:23 +00:00
  • 2eb66c33e7 Clarify the role of "keypos" and more about validation. Directly patched by schwarze@---thanks! kristapsdz 2017-10-18 20:07:59 +00:00
  • 041ba58542 Use fullwriteword() instead of a fullwrite() dance, as suggested by schwarze@. While here, also improve the documentation for the output() function and also fullwriteword() itself. kristapsdz 2017-10-18 20:03:19 +00:00
  • ba5dc82a07 Clarify the role of field validation directly as patched by schwarze@---thanks! While here, add schwarze@ to the copyright holders line. kristapsdz 2017-10-18 19:51:53 +00:00
  • 48240bb82f Clean up the language regarding cookiemap and cookies, which affects cookienmap, fieldmap, fieldnmap, and fields. Directly from a patch by schwarze@---thanks! kristapsdz 2017-10-18 19:44:34 +00:00
  • 35a3cbb10d Check in forgotten bits. kristapsdz 2017-10-17 00:06:44 +00:00
  • c4c7edc880 From a patch (and suggestion) by schwarze@: simplify the input() loop and clean up the error handling bits. kristapsdz 2017-10-16 23:58:53 +00:00
  • 4245828e41 Document behaviour. kristapsdz 2017-10-16 23:56:05 +00:00
  • 98f4e76459 Add some more error messages and check for keypos and ctypepos in input(). kristapsdz 2017-10-16 23:35:52 +00:00
  • 3e9df1b792 Much better error reporting on parent failures when reading from child. Also guard against bad enumeration values and out-of-range values. Use fullreadwordsz and fullreadword instead of duplicating functionality. All of these were noted by schwarze@---thanks! kristapsdz 2017-10-16 23:02:57 +00:00
  • 88e6852a3f Be even more explicit. From a suggestion by schwarze@---thanks! kristapsdz 2017-10-16 22:31:46 +00:00
  • 271c209daf Add a fullreadword() that has a size parameter. kristapsdz 2017-10-16 22:29:18 +00:00
  • e8d5e9cb22 As suggested by schwarze@, simplify decoding the '+'. Thanks! kristapsdz 2017-10-16 21:39:43 +00:00
  • 68b2e35d14 No need to re-NUL terminate as found by schwarze@---thanks! kristapsdz 2017-10-16 21:36:04 +00:00
  • fa210b2b78 Don't make URL decoding abort the parse sequence on failure. Found by schwarze@---thanks! kristapsdz 2017-10-16 21:29:30 +00:00
  • ff65d3f1bd Use proper warning function. kristapsdz 2017-10-16 21:23:39 +00:00
  • f64ee5c9dc Remove unused variable. From a patch by schwarze@, thanks! kristapsdz 2017-10-11 00:00:49 +00:00
  • 4596f8fe30 Add warnings for [some] RFC violations. Issue raised by schwarze@---thanks! kristapsdz 2017-10-10 23:56:04 +00:00
  • e5491b46f6 Patch by schwarze@ (augmented for invalidity) regarding SERVER_PORT. kristapsdz 2017-10-10 23:54:26 +00:00
  • d18f9b82cd It's an RFC violation not to specify the remote address. kristapsdz 2017-10-10 23:36:35 +00:00
  • e36c9311fb Clarify the "host" field as patched by schwarze@ and augmented with an example. kristapsdz 2017-10-10 23:19:09 +00:00
  • 189290c8a6 Remove "pname" symbol, found by schwarze@ -- thanks! kristapsdz 2017-10-10 22:58:12 +00:00
  • ae3308a8af Fix "path" documentation to sync with manpage as noted by schwarze@, thanks! kristapsdz 2017-10-10 22:57:55 +00:00
  • 1c2ac98cff Modified version of a patch by schwarze@ to clarify the role of pname. Thanks! kristapsdz 2017-10-10 22:55:31 +00:00
  • 8809d51f99 Significantly improve the path, page, suffix, and pagename documentation bits. From a patch by schwarze@, thanks! kristapsdz 2017-10-10 22:39:54 +00:00
  • f22be23fa9 Broadly convert nil->NUL as per the C standard. Noted by scharze@. I haven't checked these all to see whether the NUL needs to be mentioned at all, though. kristapsdz 2017-10-10 21:42:05 +00:00
  • 4520557f75 Don't use ambiguous names (use "file", "app", etc.) and don't use the term "absolute path" in a non-path context. Pointed out by schwarze@ --- thanks! kristapsdz 2017-10-10 21:33:43 +00:00
  • 03c6b79da4 Note: don't use "note" as much. Noted by schwarze@: kristapsdz 2017-10-10 21:26:23 +00:00
  • d9d6528339 Fix misformatted comment as noted by schwarze@, thanks! kristapsdz 2017-10-10 20:57:29 +00:00
  • 4ebe1ffaac Patch introduced by schwarze@ and tweaked by kristaps@ in fixing the documentation for fullpath. kristapsdz 2017-10-10 18:14:59 +00:00
  • d3bcdd1add Specify remote address algorithm and note that it need not be canonical. Noted by schwarze@ --- thanks! kristapsdz 2017-10-10 17:58:06 +00:00
  • 98bce141ec Specify kscheme value. From a patch by schwarze@, thanks! kristapsdz 2017-10-10 17:50:47 +00:00
  • f03b630dde Move documentation of "rawauth.type" into the khttpauth structure. Also document the "digest" field whilst there. Prompted by schwarze@ -- thanks! kristapsdz 2017-10-09 23:25:27 +00:00
  • 7438061fb4 Portability. kristapsdz 2017-10-04 18:07:04 +00:00
  • 20e803deb4 Document verr and note 1024 (really 1023) byte limit. Also remove "convenience" from description. kristapsdz 2017-10-04 17:59:02 +00:00
  • ffc9b77d0e Add verr-style functions and reduce number of static strings in logging.c. Also add __dead attribute to error functions. kristapsdz 2017-10-04 17:54:39 +00:00
  • 9ad56ebb55 Note log functions. kristapsdz 2017-10-04 17:48:35 +00:00
  • 5476319099 Clean up the logging manpages quite a lot, splitting out kutil_openlog in the process. kristapsdz 2017-10-04 17:48:03 +00:00
  • 69d7e8c353 Great catch by schwarze@: make sure IPC handles the new proper type of the "nc" value. kristapsdz 2017-10-04 16:21:19 +00:00
  • 20b90ca65c Add more types. kristapsdz 2017-10-04 16:13:25 +00:00
  • 704be0486e Have the "err" functions cause an exit(EXIT_FAILURE). kristapsdz 2017-10-04 16:13:10 +00:00
  • 428f828350 Add in ZIP file extension. kristapsdz 2017-10-04 16:05:33 +00:00
  • 52ef0a8f6b Add error log channel. This is still in progress because the system will need to exit on error. kristapsdz 2017-10-04 16:04:38 +00:00
  • 95dea7efbf Document types. kristapsdz 2017-10-04 02:55:41 +00:00
  • 23e1f700bd Sort fields and show field types. From a patch by schwarze@---thanks! kristapsdz 2017-10-03 23:50:45 +00:00
  • 96d9b28c5c From schwarze@: kristapsdz 2017-10-03 23:39:26 +00:00
  • ceb50df667 Use the proper type for the nonce count (uint32_t) and use strtonum() to ensure safe parsing. This emerged from a bug report by schwarze@ --- thanks! kristapsdz 2017-10-03 23:03:03 +00:00
  • c4d5fa64ce As noted by schwarze@: clean up the look-ahead part of the function to be clearer and note behaviour in documentation. Thanks! kristapsdz 2017-10-03 22:26:14 +00:00
  • 5134c301c7 Patch by schwarze@ (thanks!): kristapsdz 2017-10-03 21:53:49 +00:00
  • b53a2fbd6b Clarify role of "auth": patched by schwarze@, thanks! kristapsdz 2017-10-03 21:31:57 +00:00
  • a21bad5a5e Version ready. kristapsdz 2017-09-24 06:21:06 +00:00
  • 19641b694c Specify sort type. kristapsdz 2017-09-24 00:27:04 +00:00
  • 3eecf9dac9 Reverse date sort for tutorials. kristapsdz 2017-09-24 00:26:45 +00:00
  • d52d52a8bc Nicer fonts. kristapsdz 2017-09-24 00:26:28 +00:00
  • 2318af7c2a Clarify installation instructions. kristapsdz 2017-09-23 22:08:49 +00:00
  • dcecb02532 Make layout and fonts consistent for www. kristapsdz 2017-09-23 22:08:22 +00:00
  • 00a977577b Build sample. kristapsdz 2017-09-23 19:34:12 +00:00
  • 07547c55c6 Improve www look and field. kristapsdz 2017-09-23 19:34:03 +00:00
  • 631e100afd Kick out stupid JS in favour of using the input/label trick. kristapsdz 2017-09-23 18:11:05 +00:00
  • a7734b897b Only use <stdlib.h> where necessary. Noted by schwarze@, thanks! kristapsdz 2017-09-22 00:21:07 +00:00
  • e7dd56601d Improve language, from a tweaked patch by schwarze@, thanks! kristapsdz 2017-09-21 21:57:02 +00:00
  • 27354e87b3 Clearer commit messages. kristapsdz 2017-09-21 21:43:59 +00:00