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

Crashes when opening item without expiration date #344

Closed
julianfairfax opened this issue Jun 3, 2023 · 1 comment
Closed

Crashes when opening item without expiration date #344

julianfairfax opened this issue Jun 3, 2023 · 1 comment

Comments

@julianfairfax
Copy link

See aivanovski/keepassvault#132 and https://gitlab.gnome.org/World/secrets/-/issues/468. GNOME Secrets crashes when you opening an item (i.e. go to the edit page of one) that doesn't have an expiration date set.

Stacktrace:

(secrets:99359): IBUS-WARNING **: 11:28:08.708: Unable to connect to ibus: Could not connect: Connection refused

(secrets:99359): Gtk-WARNING **: 11:28:10.696: GtkText - did not receive a focus-out event.
If you handle this event, you must return
GDK_EVENT_PROPAGATE so the default handler
gets the event as well
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/gi/_propertyhelper.py", line 401, in obj_set_property
    prop.fset(self, value)
  File "/usr/lib/python3.11/site-packages/gsecrets/widgets/expiration_date_row.py", line 50, in safe_entry
    expiry_date = entry.expiry_time  # UTC
                  ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gsecrets/safe_element.py", line 900, in expiry_time
    time = self.entry.expiry_time
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pykeepass/baseelement.py", line 130, in expiry_time
    return self._get_times_property('ExpiryTime')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pykeepass/baseelement.py", line 97, in _get_times_property
    return self._kp._decode_time(prop.text)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pykeepass/pykeepass.py", line 897, in _decode_time
    return parser.parse(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 1368, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 640, in parse
    res, skipped_tokens = self._parse(timestr, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 719, in _parse
    l = _timelex.split(timestr)         # Splits the timestr into tokens
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 201, in split
    return list(cls(s))
                ^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 69, in __init__
    raise TypeError('Parser must be a string or character stream, not '
TypeError: Parser must be a string or character stream, not NoneType

The developers fixed it: https://gitlab.gnome.org/World/secrets/-/merge_requests/772, but say it's an issue with this tool.

@Evidlo
Copy link
Member

Evidlo commented Jun 5, 2023

Should be fixed in 4.0.5

@Evidlo Evidlo closed this as completed Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants