access denied using ie when upload file

本文探讨了在Internet Explorer浏览器中遇到的一个常见问题:从一个框架尝试提交另一个框架内的表单时出现的安全限制。文章建议避免使用form.submit()方法,并推荐采用让用户点击提交按钮并利用表单的onsubmit事件进行验证的方式。

That's right, avoid form.submit() if you can. (And 99% of the time, you can.) IE (especially IE7) takes a lot of extra security precautions when a script in one frame tries to invoke certain actions (such as form submission) in another frame. Instead, have the user click a "submit" button and cancel (if necessary) using an "onsubmit" handler attached to the form, instead of validating and then submitting.

Although browsers can be difficult, there are many ways to get the job done. If your first approach doesn't work there are probably several others that will.

 

转自:http://bytes.com/topic/javascript/answers/602230-problem-ie-ajax-file-upload-via-iframe-javascript-error-access-denied-zugriff-verweigert

[2025-08-12 10:38:11 +0800] [2852731] [DEBUG] Current configuration: config: /srv/webvirtcloud/gunicorn.conf.py wsgi_app: None bind: ['127.0.0.1:8000'] backlog: 2048 workers: 17 worker_class: sync threads: 1 worker_connections: 1000 max_requests: 0 max_requests_jitter: 0 timeout: 600 graceful_timeout: 30 keepalive: 2 limit_request_line: 4094 limit_request_fields: 100 limit_request_field_size: 8190 reload: False reload_engine: auto reload_extra_files: [] spew: False check_config: False print_config: False preload_app: False sendfile: None reuse_port: False chdir: /srv/webvirtcloud daemon: False raw_env: [] pidfile: None worker_tmp_dir: None user: 33 group: 33 umask: 0 initgroups: False tmp_upload_dir: None secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'} forwarded_allow_ips: ['127.0.0.1', '::1'] accesslog: - disable_redirect_access_to_syslog: False access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" errorlog: - loglevel: debug capture_output: False logger_class: gunicorn.glogging.Logger logconfig: None logconfig_dict: {} logconfig_json: None syslog_addr: udp://localhost:514 syslog: False syslog_prefix: None syslog_facility: user enable_stdio_inheritance: False statsd_host: None dogstatsd_tags: statsd_prefix: proc_name: None default_proc_name: webvirtcloud.wsgi:application pythonpath: None paste: None on_starting: <function OnStarting.on_starting at 0x76b703ded750> on_reload: <function OnReload.on_reload at 0x76b703ded870> when_ready: <function WhenReady.when_ready at 0x76b703ded990> pre_fork: <function Prefork.pre_fork at 0x76b703dedab0> post_fork: <function Postfork.post_fork at 0x76b703dedbd0> post_worker_init: <function PostWorkerInit.post_worker_init at 0x76b703dedcf0> worker_int: <function WorkerInt.worker_int at 0x76b703dede10> worker_abort: <function WorkerAbort.worker_abort at 0x76b703dedf30> pre_exec: <function PreExec.pre_exec at 0x76b703dee050> pre_request: <function PreRequest.pre_request at 0x76b703dee170> post_request: <function PostRequest.post_request at 0x76b703dee200> child_exit: <function ChildExit.child_exit at 0x76b703dee320> worker_exit: <function WorkerExit.worker_exit at 0x76b703dee440> nworkers_changed: <function NumWorkersChanged.nworkers_changed at 0x76b703dee560> on_exit: <function OnExit.on_exit at 0x76b703dee680> ssl_context: <function NewSSLContext.ssl_context at 0x76b703dee7a0> proxy_protocol: False proxy_allow_ips: ['127.0.0.1', '::1'] keyfile: None certfile: None ssl_version: 2 cert_reqs: 0 ca_certs: None suppress_ragged_eofs: True do_handshake_on_connect: False ciphers: None raw_paste_global_conf: [] permit_obsolete_folding: False strip_header_spaces: False permit_unconventional_http_method: False permit_unconventional_http_version: False casefold_http_method: False forwarder_headers: ['SCRIPT_NAME', 'PATH_INFO'] header_map: drop [2025-08-12 10:38:11 +0800] [2852731] [INFO] Starting gunicorn 23.0.0 [2025-08-12 10:38:11 +0800] [2852731] [DEBUG] Arbiter booted [2025-08-12 10:38:11 +0800] [2852731] [INFO] Listening at: http://127.0.0.1:8000 (2852731) [2025-08-12 10:38:11 +0800] [2852731] [INFO] Using worker: sync [2025-08-12 10:38:11 +0800] [2852742] [INFO] Booting worker with pid: 2852742 [2025-08-12 10:38:11 +0800] [2852743] [INFO] Booting worker with pid: 2852743 [2025-08-12 10:38:11 +0800] [2852744] [INFO] Booting worker with pid: 2852744 [2025-08-12 10:38:11 +0800] [2852745] [INFO] Booting worker with pid: 2852745 [2025-08-12 02:38:11 +0000] [2852742] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3.10/logging/config.py", line 565, in configure handler = self.configure_handler(handlers[name]) File "/usr/lib/python3.10/logging/config.py", line 746, in configure_handler result = factory(**kwargs) File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding, File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__ logging.FileHandler.__init__(self, filename, mode=mode, File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open return open_func(self.baseFilename, self.mode, PermissionError: [Errno 13] Permission denied: '/srv/webvirtcloud/webvirtcloud.log' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker worker.init_process() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 135, in init_process self.load_wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi self.wsgi = self.app.wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 57, in load return self.load_wsgiapp() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp return util.import_app(self.app_uri) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/util.py", line 370, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/srv/webvirtcloud/webvirtcloud/wsgi.py", line 19, in <module> application = get_wsgi_application() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/__init__.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/utils/log.py", line 76, in configure_logging logging_config_func(logging_settings) File "/usr/lib/python3.10/logging/config.py", line 811, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python3.10/logging/config.py", line 572, in configure raise ValueError('Unable to configure handler ' ValueError: Unable to configure handler 'default' [2025-08-12 02:38:11 +0000] [2852742] [INFO] Worker exiting (pid: 2852742) [2025-08-12 10:38:11 +0800] [2852746] [INFO] Booting worker with pid: 2852746 [2025-08-12 10:38:11 +0800] [2852731] [ERROR] Worker (pid:2852742) exited with code 3 [2025-08-12 02:38:11 +0000] [2852743] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3.10/logging/config.py", line 565, in configure handler = self.configure_handler(handlers[name]) File "/usr/lib/python3.10/logging/config.py", line 746, in configure_handler result = factory(**kwargs) File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding, File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__ logging.FileHandler.__init__(self, filename, mode=mode, File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open return open_func(self.baseFilename, self.mode, PermissionError: [Errno 13] Permission denied: '/srv/webvirtcloud/webvirtcloud.log' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker worker.init_process() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 135, in init_process self.load_wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi self.wsgi = self.app.wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 57, in load return self.load_wsgiapp() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp return util.import_app(self.app_uri) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/util.py", line 370, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/srv/webvirtcloud/webvirtcloud/wsgi.py", line 19, in <module> application = get_wsgi_application() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/__init__.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/utils/log.py", line 76, in configure_logging logging_config_func(logging_settings) File "/usr/lib/python3.10/logging/config.py", line 811, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python3.10/logging/config.py", line 572, in configure raise ValueError('Unable to configure handler ' ValueError: Unable to configure handler 'default' [2025-08-12 02:38:11 +0000] [2852743] [INFO] Worker exiting (pid: 2852743) [2025-08-12 02:38:11 +0000] [2852744] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3.10/logging/config.py", line 565, in configure handler = self.configure_handler(handlers[name]) File "/usr/lib/python3.10/logging/config.py", line 746, in configure_handler result = factory(**kwargs) File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding, File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__ logging.FileHandler.__init__(self, filename, mode=mode, File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open return open_func(self.baseFilename, self.mode, PermissionError: [Errno 13] Permission denied: '/srv/webvirtcloud/webvirtcloud.log' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker worker.init_process() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 135, in init_process self.load_wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi self.wsgi = self.app.wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 57, in load return self.load_wsgiapp() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp return util.import_app(self.app_uri) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/util.py", line 370, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/srv/webvirtcloud/webvirtcloud/wsgi.py", line 19, in <module> application = get_wsgi_application() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/__init__.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/utils/log.py", line 76, in configure_logging logging_config_func(logging_settings) File "/usr/lib/python3.10/logging/config.py", line 811, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python3.10/logging/config.py", line 572, in configure raise ValueError('Unable to configure handler ' ValueError: Unable to configure handler 'default' [2025-08-12 02:38:11 +0000] [2852744] [INFO] Worker exiting (pid: 2852744) [2025-08-12 02:38:11 +0000] [2852745] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3.10/logging/config.py", line 565, in configure handler = self.configure_handler(handlers[name]) File "/usr/lib/python3.10/logging/config.py", line 746, in configure_handler result = factory(**kwargs) File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding, File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__ logging.FileHandler.__init__(self, filename, mode=mode, File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__ StreamHandler.__init__(self, self._open()) File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open return open_func(self.baseFilename, self.mode, PermissionError: [Errno 13] Permission denied: '/srv/webvirtcloud/webvirtcloud.log' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker worker.init_process() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 135, in init_process self.load_wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi self.wsgi = self.app.wsgi() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 57, in load return self.load_wsgiapp() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp return util.import_app(self.app_uri) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/util.py", line 370, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 688, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/srv/webvirtcloud/webvirtcloud/wsgi.py", line 19, in <module> application = get_wsgi_application() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/__init__.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/django/utils/log.py", line 76, in configure_logging logging_config_func(logging_settings) File "/usr/lib/python3.10/logging/config.py", line 811, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python3.10/logging/config.py", line 572, in configure raise ValueError('Unable to configure handler ' ValueError: Unable to configure handler 'default' [2025-08-12 02:38:11 +0000] [2852745] [INFO] Worker exiting (pid: 2852745) [2025-08-12 10:38:11 +0800] [2852731] [ERROR] Worker (pid:2852743) exited with code 3 Traceback (most recent call last): File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 201, in run self.manage_workers() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 570, in manage_workers self.spawn_workers() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 642, in spawn_workers time.sleep(0.1 * random.random()) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 241, in handle_chld self.reap_workers() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 529, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/webvirtcloud/venv/bin/gunicorn", line 8, in <module> sys.exit(run()) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 66, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 235, in run super().run() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/app/base.py", line 71, in run Arbiter(self).run() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 228, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 341, in halt self.stop() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 395, in stop time.sleep(0.1) File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 241, in handle_chld self.reap_workers() File "/srv/webvirtcloud/venv/lib/python3.10/site-packages/gunicorn/arbiter.py", line 529, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
08-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值