Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38243: Escape the server_title of DocXMLRPCServer when rendering #16373

Merged
merged 5 commits into from Sep 27, 2019

Conversation

@corona10
Copy link
Member

corona10 commented Sep 25, 2019

Escape the server_title of DocXMLRPCServer when rendering,
The title will only be escaped when the server_title should be rendered.

https://bugs.python.org/issue38243

@corona10 corona10 force-pushed the corona10:bpo-38243 branch from b4448fa to 10d2f0b Sep 26, 2019
@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Sep 26, 2019

@tirkarthi I've updated the PR, thank you for the feedback.

@corona10 corona10 requested a review from vstinner Sep 26, 2019
Lib/test/test_docxmlrpc.py Outdated Show resolved Hide resolved
@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Sep 27, 2019

@tirkarthi I've reflected your comment. Thanks for the review.

@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Sep 27, 2019

@vstinner Updated!

@vstinner vstinner merged commit e8650a4 into python:master Sep 27, 2019
4 checks passed
4 checks passed
Azure Pipelines PR #20190927.17 succeeded
Details
bedevere/issue-number Issue number 38243 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Sep 27, 2019

Thanks @corona10 for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8.
🐍🍒🤖

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Sep 27, 2019

GH-16439 is a backport of this pull request to the 3.8 branch.

@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Sep 27, 2019

GH-16440 is a backport of this pull request to the 3.7 branch.

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Sep 27, 2019

Sorry, @corona10 and @vstinner, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa 3.6

miss-islington added a commit to miss-islington/cpython that referenced this pull request Sep 27, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
vstinner added a commit to vstinner/cpython that referenced this pull request Sep 27, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.

(cherry picked from commit e8650a4)
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Sep 27, 2019

GH-16441 is a backport of this pull request to the 3.6 branch.

@vstinner

This comment has been minimized.

Copy link
Member

vstinner commented Sep 27, 2019

@corona10: I backported manually your change to 3.6. I just had to fix a simple conflict on imports.

Would you mind to try to backport the change to Python 2.7 which also has the bug?

miss-islington added a commit that referenced this pull request Sep 27, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
miss-islington added a commit that referenced this pull request Sep 27, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
(cherry picked from commit e8650a4)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
@bedevere-bot

This comment has been minimized.

Copy link

bedevere-bot commented Sep 27, 2019

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora 3.7 has failed when building commit 39a0c75.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/120/builds/1323) and take a look at the build logs.
  4. Check if the failure is related to this commit (39a0c75) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/120/builds/1323

Failed tests:

  • test_readline
  • test_os
  • test_asyncio

Failed subtests:

  • test_read_pty_output - test.test_asyncio.test_events.EPollEventLoopTests
  • test_bidirectional_pty - test.test_asyncio.test_events.SelectEventLoopTests
  • test_write_pty - test.test_asyncio.test_events.SelectEventLoopTests
  • test_bidirectional_pty - test.test_asyncio.test_events.PollEventLoopTests
  • test_auto_history_disabled - test.test_readline.TestReadline
  • test_write_pty - test.test_asyncio.test_events.PollEventLoopTests
  • test_history_size - test.test_readline.TestReadline
  • test_read_pty_output - test.test_asyncio.test_events.PollEventLoopTests
  • test_openpty - test.test_os.FDInheritanceTests
  • test_bidirectional_pty - test.test_asyncio.test_events.EPollEventLoopTests
  • test_nonascii - test.test_readline.TestReadline
  • test_write_pty - test.test_asyncio.test_events.EPollEventLoopTests
  • test_auto_history_enabled - test.test_readline.TestReadline
  • test_read_pty_output - test.test_asyncio.test_events.SelectEventLoopTests

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

400 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 35 sec
  • test_tokenize: 2 min 25 sec
  • test_multiprocessing_spawn: 2 min 23 sec
  • test_tools: 2 min 4 sec
  • test_lib2to3: 1 min 44 sec
  • test_multiprocessing_forkserver: 1 min 24 sec
  • test_multiprocessing_fork: 1 min 12 sec
  • test_io: 1 min 586 ms
  • test_asyncio: 59 sec 419 ms
  • test_subprocess: 39 sec 224 ms

3 tests failed:
test_asyncio test_os test_readline

13 tests skipped:
test_devpoll test_ioctl test_kqueue test_msilib test_ossaudiodev
test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio
test_winreg test_winsound test_zipfile64

3 re-run tests:
test_asyncio test_os test_readline

Total duration: 20 min 20 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 623, in wrapper
    return func(*args, **kw)
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_events.py", line 1645, in test_bidirectional_pty
    master, read_slave = os.openpty()
FileNotFoundError: [Errno 2] No such file or directory


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 149, in test_auto_history_enabled
    output = run_pty(self.auto_history_script.format(True))
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 285, in run_pty
    [master, slave] = pty.openpty()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 59, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_os.py", line 3273, in test_openpty
    master_fd, slave_fd = os.openpty()
FileNotFoundError: [Errno 2] No such file or directory


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 274, in test_history_size
    run_pty(script, input=b"last input\r", env=env)
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 285, in run_pty
    [master, slave] = pty.openpty()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 59, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 226, in test_nonascii
    output = run_pty(script, input)
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 285, in run_pty
    [master, slave] = pty.openpty()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 59, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_events.py", line 1503, in test_read_pty_output
    master, slave = os.openpty()
FileNotFoundError: [Errno 2] No such file or directory


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 153, in test_auto_history_disabled
    output = run_pty(self.auto_history_script.format(False))
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_readline.py", line 285, in run_pty
    [master, slave] = pty.openpty()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/pty.py", line 59, in _open_terminal
    raise OSError('out of pty devices')
OSError: out of pty devices


Traceback (most recent call last):
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/support/__init__.py", line 623, in wrapper
    return func(*args, **kw)
  File "/home/shager/cpython-buildarea/3.7.edelsohn-fedora-ppc64le/build/Lib/test/test_asyncio/test_events.py", line 1601, in test_write_pty
    master, slave = os.openpty()
FileNotFoundError: [Errno 2] No such file or directory
@corona10

This comment has been minimized.

Copy link
Member Author

corona10 commented Sep 27, 2019

@vstinner Sure!

ned-deily added a commit that referenced this pull request Sep 28, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.

(cherry picked from commit e8650a4)
vstinner added a commit to vstinner/cpython that referenced this pull request Oct 1, 2019
…ythonGH-16441)

Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.

(cherry picked from commit e8650a4)
(cherry picked from commit 1698cac)
vstinner added a commit to vstinner/cpython that referenced this pull request Oct 8, 2019
…ythonGH-16441)

Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.

(cherry picked from commit e8650a4)
(cherry picked from commit 1698cac)
larryhastings added a commit that referenced this pull request Oct 29, 2019
… (#16516)

Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.

(cherry picked from commit e8650a4)
jacobneiltaylor added a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
Escape the server title of xmlrpc.server.DocXMLRPCServer
when rendering the document page as HTML.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.