Skip to content

core: add dynamic password infrastructure #1

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

Closed
wants to merge 1 commit into from

Conversation

flyn-org
Copy link

@flyn-org flyn-org commented May 5, 2018

Some media sources (e.g., DAAP) support notifying a client that
a password is required at connection time. Since such sources
are commonly detected with protocols like DNS-SD, Grilo needs a
mechanism to support handling such password requests.

This work adds a new "grl_source_notify_authenticate" function which a
plugin can call when a password is needed. The function, in turn, emits an
"authenticate" signal which the application should respond to by obtaining
a password. The application then provides the password back to the plugin
by calling the new "grl_daap_source_continue_with_password" function.

Signed-off-by: W. Michael Petullo [email protected]

@flyn-org
Copy link
Author

flyn-org commented May 5, 2018

Some media sources (e.g., DAAP) support notifying a client that a password
is required at connection time. Since such sources are commonly detected
with protocols like DNS-SD, Grilo needs a mechanism to support handling
such password requests.

This work adds a new "grl_source_notify_authenticate" function which a
plugin can call when a password is needed. The function, in turn, emits an
"authenticate" signal which the application should respond to by obtaining
a password. The application then provides the password back to the plugin
by calling the new "grl_daap_source_continue_with_password" function.

Signed-off-by: W. Michael Petullo <[email protected]>
@gnomesysadmins
Copy link
Contributor

Thank you for contributing to grilo!

grilo uses Bugzilla for code review.

If you have never contributed to GNOME before make sure you have read the
getting started documentation:
https://www.gnome.org/get-involved

Otherwise please visit
https://wiki.gnome.org/Newcomers
and follow the instructions there to upload your change to https://gitlab.gnome.org.

gnomesysadmins pushed a commit that referenced this pull request Oct 3, 2018
Found it while writing unit tests for it.

Backtrace:
 | Thread 1 "media" received signal SIGSEGV, Segmentation fault.
 | grl_registry_register_metadata_key_for_type (registry=registry@entry=0x6180d0,
 | key_name=key_name@entry=0x615fdd "grl-key-double-set-that-does-not-exist",
 | type=type@entry=60) at ../src/grl-registry.c:643

 | 643           GRL_WARNING ("'%s' is being ignored as G_TYPE '%s' is not being handled",

 | (gdb) bt
 | #0  0x00007ffff7bbd260 in grl_registry_register_metadata_key_for_type
 |     (registry=registry@entry=0x6180d0, key_name=key_name@entry=0x615fdd
 |     "grl-key-double-set-that-does-not-exist", type=type@entry=60)
 |     at ../src/grl-registry.c:643
 | #1  0x00007ffff7bad1e9 in grl_data_set_for_id (data=0x642d60,
 |     key_name=0x615fdd "grl-key-double-set-that-does-not-exist",
 |     key_name@entry=0x60da10 "grl-key-double-set-that-does-not-exist",
 |     value=value@entry=0x7fffffffd2e0) at ../src/data/grl-data.c:685
 | #2  0x00000000004016b9 in test_set_for_id_new_key (fixture=0x613bf0,
 |     data=0x1) at ../tests/media.c:103

Signed-off-by: Victor Toso <[email protected]>
gnomesysadmins pushed a commit that referenced this pull request Dec 18, 2024
Tested on both success and failure code paths

- iTunes podcast (successfully loads)
- Rai.tv (fails to load and error is reported)
- Mock data - iTunes podcast capture.
- Mock error - no capture.

 #0  0x00007fffd475f4c2 in proxy_call_browse_grlnet_async_cb (source_object=0x1756430, res=0x19d3c50, user_data=0x1a45ee0) at grilo-plugins/src/raitv/grl-raitv.c:614
 #1  0x00007ffff72acccc in g_task_return_now () at /lib64/libgio-2.0.so.0
 #2  0x00007ffff72b0993 in g_task_return () at /lib64/libgio-2.0.so.0
 #3  0x00007ffff72b1735 in g_task_return_new_error () at /lib64/libgio-2.0.so.0
 #4  0x00007fffdf7d70d9 in parse_error (status=<optimized out>, reason=0x1063060 "Not Found", task=0x19d3c50) at grilo/libs/net/grl-net-wc.c:491
 #5  read_async_cb (source=<optimized out>, res=<optimized out>, user_data=0x19d3c50) at grilo/libs/net/grl-net-wc.c:641

609	  if (!grl_net_wc_request_finish (GRL_NET_WC (source_object),
610	                                  res,
611	                                  &content,
612	                                  &length,
613	                                  &wc_error)) {
614	    error = g_error_new (GRL_CORE_ERROR,
615	                         GRL_CORE_ERROR_SEARCH_FAILED,
616	                         _("Failed to browse: %s"),
617	                         wc_error->message);
618
(gdb) p wc_error
$29 = (GError *) 0x0
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

Successfully merging this pull request may close these issues.

2 participants