Commit graph

61 commits

Author SHA1 Message Date
Brad Warren
abed73a8e4
Revert "Nginx reversion (#5299)" (#5305)
This reverts commit c9949411cd.
2017-12-06 17:45:20 -08:00
Brad Warren
c9949411cd
Nginx reversion (#5299)
The reason for this PR is many bug fixes in the nginx plugin for changes we haven't released yet are included in #5220 which may not make our next release. If it doesn't, we will (mostly) revert the nginx plugin back to its previous state to avoid releasing these bugs and will revert this PR after the release.

* Revert "Nginx IPv6 support (#5178)"

This reverts commit 68e37b03c8.

* Revert "Fix bug that stopped nginx from finding new server block for redirect (#5198)"

This reverts commit e2ab940ac0.

* Revert "Nginx creates a vhost block if no matching block is found (#5153)"

This reverts commit 95a7d45856.
2017-12-05 20:04:08 -08:00
ohemorange
95a7d45856 Nginx creates a vhost block if no matching block is found (#5153)
* Allow authentication if there's no appropriate vhost

* Update test

* add flag to suppress raising error if no match is found

* Allow installation if there's no appropriate vhost

* remove traceback

* make new vhost ssl

* Fix existing bugs in nginxparser.py and obj.py

* Switch isinstance(x, str) to isinstance(x, six.string_types) in the Nginx plugin

* remove unused import

* remove unneeded custom copy from Addr

* Add docstring for create_new_vhost_from_default

* add test for create_new_vhost_from_default

* add configurator tests and leave finding the first server block for another PR

* don't assume order from a set

* address multiple default_server problem

* don't add vhosts twice

* update unit tests

* update docstring

* Add logger.info message for using default address in tlssni01 auth
2017-10-13 12:29:02 -07:00
Erica Portnoy
7be2e79025 Fix nginx parser (#4296)
* rewrite nginx parser to allow everything that nginx does

* also make changes in tls_sni_01.py

* add test case with

* allow embedded variables

* allow empty ${} variable

* fix quotes

* un-special case if

* update all tests to reflect current parsing

* escape in QuotedString after merge

* add test cases for variable weirdness that are almost certainly nginx bugs

* update regex for correct variable rules

* close paren doesn't invoke last_space

* Make test file valid Nginx syntax
2017-03-24 19:45:53 -07:00
kernelpanek
e715b49dd2 Don't unquote the results of the parse 2017-03-15 01:26:16 -06:00
kernelpanek
5758b1687d Fixes issue when parsing an Nginx configuration file containing multiline quoted strings 2017-03-15 00:25:26 -06:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -08:00
Ondřej Surý
06e07ca49b pyparsing.restOfLine is not a function, don't call it (#3989) 2017-01-09 18:29:02 -08:00
Brad Warren
0b0eca323c Remove extra newline 2016-08-16 15:36:41 -07:00
Peter Eckersley
7deb1f0ad6 Fix bug with UnpsacedList.insert to final position
- which only applied when the list actually contained spaces
2016-08-08 12:15:18 -07:00
Peter Eckersley
a8abde7d8d Merge remote-tracking branch 'origin/no-conflicting-declarations3' into no-conflicting-declarations3 2016-08-05 14:47:41 -07:00
Peter Eckersley
61b81b877d Merge remote-tracking branch 'origin/master' into no-conflicting-declarations3 2016-07-29 17:28:29 -07:00
Brad Warren
4eb38fe167 Make spaced list handle an insert past the end of the list 2016-07-26 17:09:01 -07:00
Brad Warren
f98470d4a0 Revert "UnspacedList._spaced_position: support the slice at the end fo the list"
This reverts commit 85d9ab4d5c.
2016-07-26 17:01:24 -07:00
Peter Eckersley
85d9ab4d5c UnspacedList._spaced_position: support the slice at the end fo the list
- Which is needed for .insert()ing at the end, for instance.
2016-07-21 13:39:13 -07:00
Peter Eckersley
e3ab49a93b Rework "value" parser:
- Now handles any${VAR_SUBSTITUTION}inthemiddle/of/values
  - Don't use a single giant janky Regex; use small ones and have PyParsing
    combine them
2016-07-15 17:11:04 -07:00
Peter Eckersley
b6966fc05e lint 2016-07-15 17:11:04 -07:00
Peter Eckersley
7183896ed7 Preserve spaces before comments at the beginning of a file 2016-07-15 17:11:04 -07:00
Peter Eckersley
b7cf928852 Parse charset_map correctly
(though we still don't emit it correctly...)
2016-07-13 17:17:45 -07:00
Peter Eckersley
68500cd436 Don't allow dollar_var to swalllow characters like "{" 2016-07-09 15:13:09 -07:00
Peter Eckersley
be8f0bc53b Do a better job of parsing map patterns 2016-06-30 15:29:38 -07:00
Peter Eckersley
db8ddac4e2 lint & tweak 2016-06-30 15:13:35 -07:00
Peter Eckersley
8c3e443de9 First attempt at mitigating #3206 2016-06-30 15:07:28 -07:00
Peter Eckersley
bdbdd826de Extra comment & concision 2016-06-27 12:50:06 -07:00
Peter Eckersley
6017a6cb6d Only write nginx config files if we've modified them 2016-06-27 12:44:36 -07:00
Peter Eckersley
184f54cbc7 cosmetic improvements 2016-06-27 12:36:28 -07:00
Peter Eckersley
fdbb69930b Tweak the NotImplementedError cases 2016-06-27 12:00:41 -07:00
Peter Eckersley
98d261596c Raise NotImplemented for all problematic list methods 2016-06-24 19:16:05 -07:00
Peter Eckersley
0dc4639cbf Be more explicit about range policing
(rather than doing it in some roundabout crazy way)
2016-06-24 18:56:30 -07:00
Peter Eckersley
8f0a5fdc66 Fix a bug in the new index calculations 2016-06-24 16:48:30 -07:00
Peter Eckersley
9da533d92e Be more succinct 2016-06-24 16:13:12 -07:00
Peter Eckersley
e415a4d402 For now, instead, consider this NotImplemented 2016-06-24 14:36:23 -07:00
Peter Eckersley
ad13b525b2 For reference, a buggy attempt to implement slicing
but slice assignment seems to mangle the .spaced list in some cases
2016-06-24 14:35:42 -07:00
Peter Eckersley
6930523c14 Refactor to simplify indenation handling 2016-06-23 17:59:26 -07:00
Peter Eckersley
a29c6e3102 Try simplifying handling of spacey sublists
- this was causing test failures but they may all have been fixed by other
   changes...
2016-06-23 14:06:32 -07:00
Peter Eckersley
4ef7131a4b Name all of nginxparser's magic regexps 2016-06-23 11:06:11 -07:00
Peter Eckersley
5960376d36 Cleanups 2016-06-20 18:17:47 -07:00
Peter Eckersley
ef31a837f7 Lint 2016-06-20 15:56:19 -07:00
Peter Eckersley
d2b4ae5740 Consistently coerce inbound data to Unspacines 2016-06-18 15:17:59 -07:00
Peter Eckersley
e4f88506cc Fix TLS_SNI & associated tests 2016-06-18 14:52:07 -07:00
Peter Eckersley
b2c36f8527 Lint & test fix 2016-06-17 14:39:55 -07:00
Peter Eckersley
ba0a0e9c26 Tests for UnspacedList 2016-06-17 14:32:24 -07:00
Peter Eckersley
efd1ff46c6 Lint 2016-06-16 18:18:33 -07:00
Peter Eckersley
e76e3a953a Fix test cases
- but we're still mangling files in place...
2016-06-16 17:58:05 -07:00
Peter Eckersley
b82ebd9180 Fix desyncronisation with .spaced when modifying sublists
- we now actually write directives again!
2016-06-16 17:17:13 -07:00
Peter Eckersley
72ba5b72cc Try to preserve the exact form of end-of-file whitespace 2016-06-16 12:25:11 -07:00
Peter Eckersley
e5ce03b312 More test wrangling 2016-06-16 12:24:36 -07:00
Peter Eckersley
ff7addefb3 Start fixing tests 2016-06-15 17:57:24 -07:00
Peter Eckersley
2cbd680bd5 Hide .spaced from users outside nginxparser.py 2016-06-15 17:36:53 -07:00
Peter Eckersley
4f46289c1b Start cleanup 2016-06-15 17:26:38 -07:00