Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mig/server/grid_openid.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
from mig.shared.tlsserver import hardened_ssl_context
from mig.shared.url import urlparse, urlencode, check_local_site_url, \
parse_qsl
from mig.shared.useradm import get_openid_user_dn, check_password_scramble, \

Check warning on line 119 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
check_hash
from mig.shared.userdb import default_db_path
from mig.shared.validstring import possible_user_id
Expand All @@ -135,7 +135,7 @@

# NOTE: response may contain password on the form
# (<Symbol Bare namespace>, 'password'): 'S3cr3tP4ssw0rd'
pw_pattern = "\(<Symbol Bare namespace>, 'password'\): '(.+)'"

Check warning on line 138 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

invalid escape sequence '\)'

Check warning on line 138 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

invalid escape sequence '\('
pw_regexp = re.compile(pw_pattern)


Expand All @@ -158,7 +158,7 @@
def valid_cert_fields(arg):
"""Make sure only valid cert field names are allowed"""
valid_job_id(arg, extra_chars=',')
if [i for i in arg.split(',') if not i in cert_field_names]:

Check warning on line 161 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

test for membership should be 'not in'
invalid_argument(arg)


Expand Down Expand Up @@ -303,7 +303,7 @@

# Add our own SReg fields to list of valid fields from sreg 1.1 spec
for (key, val) in cert_field_map.items():
if not key in sreg.data_fields:

Check warning on line 306 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

test for membership should be 'not in'
sreg.data_fields[key] = key.replace('_', ' ').title()
# print "DEBUG: sreg fields: %s" % sreg.data_fields
for name in cert_field_names:
Expand Down Expand Up @@ -475,7 +475,7 @@
# Resolve retry url, strip password and err

retry_query = {key: val for (key, val) in self.query.items()
if not key in ['password', 'err']}

Check warning on line 478 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

test for membership should be 'not in'
self.retry_url = "%s?%s" \
% (self.parsed_uri[2], urlencode(retry_query))

Expand Down Expand Up @@ -667,7 +667,7 @@
# Old IE 8 does not send contents of submit buttons thus only the
# fields login_as and password are set with the allow requests. We
# manually add a yes here if so to avoid the else case.
if not 'yes' in query and not 'no' in query:

Check warning on line 670 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

test for membership should be 'not in'
query['yes'] = 'yes'

if 'yes' in query:
Expand Down Expand Up @@ -1301,7 +1301,7 @@
</fieldset>
</form>
<p>
<a href="%(sid_url)s/cgi-sid/reqpwreset.py?show=migoid">Forgot your password?

Check warning on line 1304 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (89 > 80 characters)
</a>
</p>
</div>
Expand Down Expand Up @@ -1337,7 +1337,7 @@
<input type="checkbox" id="remember" name="remember" value="yes"
/><label for="remember">Remember this
decision</label><br />
Password: <input type="password" name="password" autofocus /><br />

Check warning on line 1340 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (81 > 80 characters)
<input type="submit" name="yes" value="yes" />
<input type="submit" name="no" value="no" />
</form>
Expand Down Expand Up @@ -1506,7 +1506,7 @@

<p>The URL for this server is
<a href=%s><span class="verbatim">%s</span></a>.</p>
''' % (user_message, quoteattr(self.server.base_url), self.server.base_url))

Check warning on line 1509 in mig/server/grid_openid.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

line too long (84 > 80 characters)

def showLoginPage(self, success_to, fail_to, query):
"""Login page provider"""
Expand Down Expand Up @@ -1798,3 +1798,4 @@
info_msg = "Leaving with no more workers active"
logger.info(info_msg)
print(info_msg)

1 change: 1 addition & 0 deletions mig/server/grid_sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2105,3 +2105,4 @@ def start_service(configuration):
info_msg = "Leaving with no more workers active"
logger.info(info_msg)
print(info_msg)

1 change: 1 addition & 0 deletions mig/server/grid_webdavs.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

def is_native(x): return True
elif wsgidav_major >= 3:
from wsgidav.compat import is_native

Check failure on line 85 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Name "is_native" already defined on line 83 [no-redef]
from wsgidav.debug_filter import WsgiDavDebugFilter
# No Cors middelware here
Cors = None
Expand Down Expand Up @@ -418,7 +418,7 @@
# NOTE: we extract error reason from sys here because SSLError
# only started exposing that info in python >=2.7.9
# https://docs.python.org/2.7/library/ssl.html#ssl.SSLError
exc = sys.exc_info()[1]

Check failure on line 421 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Assignment to variable "exc" outside except: block [misc]
if exc.errno == ssl.SSL_ERROR_EOF:
# This is almost certainly due to the cherrypy engine
# 'pinging' the socket to assert it's connectable;
Expand Down Expand Up @@ -1122,31 +1122,31 @@
return result
return _impl

@__allow_handle

Check failure on line 1125 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFileResource, Any, Any], Any]"; expected "MiGFileResource" [arg-type]
@__gdp_log
def handle_copy(self, dest_path, depth_infinity):
"""Handle a COPY request natively, but with our restrictions"""
return super(MiGFileResource, self).handle_copy(
dest_path, depth_infinity)

@__allow_handle

Check failure on line 1132 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFileResource, Any], Any]"; expected "MiGFileResource" [arg-type]
@__gdp_log
def handle_move(self, dest_path):
"""Handle a MOVE request natively, but with our restrictions"""
return super(MiGFileResource, self).handle_move(dest_path)

@__allow_handle

Check failure on line 1138 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFileResource], Any]"; expected "MiGFileResource" [arg-type]
@__gdp_log
def handle_delete(self):
"""Handle a DELETE request natively, but with our restrictions"""
return super(MiGFileResource, self).handle_delete()

@__gdp_log

Check failure on line 1144 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFileResource], Any]"; expected "MiGFileResource" [arg-type]
def get_content(self):
"""Handle a GET request natively and log for GDP"""
return super(MiGFileResource, self).get_content()

@__gdp_log

Check failure on line 1149 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFileResource, Any], Any]"; expected "MiGFileResource" [arg-type]
def begin_write(self, content_type=None):
"""Handle a PUT request natively and log for GDP"""
return super(MiGFileResource, self).begin_write()
Expand Down Expand Up @@ -1258,20 +1258,20 @@
return result
return _impl

@__allow_handle

Check failure on line 1261 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFolderResource, Any, Any], Any]"; expected "MiGFolderResource" [arg-type]
@__gdp_log
def handle_copy(self, dest_path, depth_infinity):
"""Handle a COPY request natively, but with our restrictions"""
return super(MiGFolderResource, self).handle_copy(
dest_path, depth_infinity)

@__allow_handle

Check failure on line 1268 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFolderResource, Any], Any]"; expected "MiGFolderResource" [arg-type]
@__gdp_log
def handle_move(self, dest_path):
"""Handle a MOVE request natively, but with our restrictions"""
return super(MiGFolderResource, self).handle_move(dest_path)

@__allow_handle

Check failure on line 1274 in mig/server/grid_webdavs.py

View workflow job for this annotation

GitHub Actions / Style check python and annotate

Argument 1 to "__gdp_log" has incompatible type "Callable[[MiGFolderResource], Any]"; expected "MiGFolderResource" [arg-type]
@__gdp_log
def handle_delete(self):
"""Handle a DELETE request natively, but with our restrictions"""
Expand Down Expand Up @@ -2141,3 +2141,4 @@
except Exception as exc:
logger.error("exiting on unexpected exception: %s" % exc)
logger.info(traceback.format_exc())

Loading