After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750161 - Crash in ephy_location_entry_set_location when loading Pocket bookmark
Crash in ephy_location_entry_set_location when loading Pocket bookmark
Status: RESOLVED WONTFIX
Product: epiphany
Classification: Core
Component: Bookmarks
3.16.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-30 21:52 UTC by Michael Catanzaro
Modified: 2016-10-07 21:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2015-05-30 21:52:49 UTC
Full backtrace downstream. The crash occurs when the user tries to click on a bookmark he created with Pocket (getpocket.com). The bookmark's "URI" isn't a URI at all, but a long JavaScript function. Apparently that somehow works in other browsers (I have never seen anything like this before), but it crashes Ephy. I had the user open the bookmark editor, select the problematic bookmark, and copypaste the contents of the address field. Here is the "address":

javascript:(function(){var e=function(t,n,r,i,s){var o=[2318853,2998040,2311501,6092008,6178016,5161823,4508546,3356059,7175292,1253278];var i=i||0,u=0,n=n||[],r=r||0,s=s||0;var a={'a':97,'b':98,'c':99,'d':100,'e':101,'f':102,'g':103,'h':104,'i':105,'j':106,'k':107,'l':108,'m':109,'n':110,'o':111,'p':112,'q':113,'r':114,'s':115,'t':116,'u':117,'v':118,'w':119,'x':120,'y':121,'z':122,'A':65,'B':66,'C':67,'D':68,'E':69,'F':70,'G':71,'H':72,'I':73,'J':74,'K':75,'L':76,'M':77,'N':78,'O':79,'P':80,'Q':81,'R':82,'S':83,'T':84,'U':85,'V':86,'W':87,'X':88,'Y':89,'Z':90,'0':48,'1':49,'2':50,'3':51,'4':52,'5':53,'6':54,'7':55,'8':56,'9':57,'\/':47,':':58,'?':63,'=':61,'-':45,'_':95,'&':38,'$':36,'!':33,'.':46};if(!s||s==0){t=o[0]+t}for(var%20f=0;f%3Ct.length;f++){var%20l=function(e,t){return%20a[e[t]]?a[e[t]]:e.charCodeAt(t)}(t,f);if(!l*1)l=3;var%20c=l*(o[i]+l*o[u%o.length]);n[r]=(n[r]?n[r]+c:c)+s+u;var%20p=c%(50*1);if(n[p]){var%20d=n[r];n[r]=n[p];n[p]=d}u+=c;r=r==50?0:r+1;i=i==o.length-1?0:i+1}if(s==113){var%20v='';for(var%20f=0;f%3Cn.length;f++){v+=String.fromCharCode(n[f]%(25*1)+97)}o=function(){};return%20v+'43c8128056'}else{return%20e(u+'',n,r,i,s+1)}};var%20t=document,n=t.location.href,r=t.title;var%20i=e(n);var%20s=t.createElement('script');s.type='text/javascript';s.src='https://getpocket.com/b/r4.js?h='+i+'&u='+encodeURIComponent(n)+'&t='+encodeURIComponent(r);e=i=function(){};var%20o=t.getElementsByTagName('head')[0]||t.documentElement;o.appendChild(s)})()

And the crash that occurs when he attempts to load the bookmark:

Thread 1 (Thread 0x7f5640696a00 (LWP 5445))

  • #0 g_str_hash
    at ghash.c line 1871
  • #1 ephy_location_entry_set_location
    at ephy-location-entry.c line 1349
  • #2 match_selected_cb
    at ephy-location-entry.c line 521
  • #3 _gtk_marshal_BOOLEAN__OBJECT_BOXED
    at gtkmarshalers.c line 1028
  • #4 g_closure_invoke
    at gclosure.c line 768
  • #5 signal_emit_unlocked_R
    at gsignal.c line 3549
  • #6 g_signal_emit_valist
    at gsignal.c line 3315
  • #7 g_signal_emit_by_name
    at gsignal.c line 3401
  • #8 gtk_entry_completion_key_press
    at gtkentrycompletion.c line 2452
  • #9 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #10 g_closure_invoke
    at gclosure.c line 768
  • #11 signal_emit_unlocked_R
    at gsignal.c line 3549
  • #12 g_signal_emit_valist
    at gsignal.c line 3315
  • #13 g_signal_emit
    at gsignal.c line 3361
  • #14 gtk_widget_event_internal
    at gtkwidget.c line 7787
  • #15 gtk_entry_completion_popup_key_event
    at gtkentrycompletion.c line 929
  • #16 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 85
  • #17 g_closure_invoke
    at gclosure.c line 768
  • #18 signal_emit_unlocked_R
    at gsignal.c line 3549
  • #19 g_signal_emit_valist
    at gsignal.c line 3315
  • #20 g_signal_emit
    at gsignal.c line 3361
  • #21 gtk_widget_event_internal
    at gtkwidget.c line 7787
  • #22 propagate_event
    at gtkmain.c line 2515
  • #23 gtk_main_do_event
    at gtkmain.c line 1756
  • #24 gdk_event_source_dispatch
    at gdkeventsource.c line 364
  • #25 g_main_dispatch
    at gmain.c line 3122
  • #26 g_main_context_dispatch
    at gmain.c line 3737
  • #27 g_main_context_iterate
    at gmain.c line 3808
  • #28 g_main_context_iteration
    at gmain.c line 3869
  • #29 g_application_run
    at gapplication.c line 2308
  • #30 main
    at ephy-main.c line 489

Comment 1 ggsalas 2015-06-01 23:50:38 UTC
If I copy and paste this code, epiphany can save my page on pocket. But if I create a bookmark with this code and go to this bookmark, epiphany crashes.
Comment 2 Carlos Garcia Campos 2015-06-02 06:00:45 UTC
My guess is that we only handle javascript: URLs when entered in the location entry.
Comment 3 ggsalas 2015-06-02 17:55:43 UTC
(In reply to Carlos Garcia Campos from comment #2)
> My guess is that we only handle javascript: URLs when entered in the
> location entry.

Yes, but in epiphany on fedora 21 it worked
Comment 4 Michael Catanzaro 2016-09-28 16:50:03 UTC
Hi, the bookmarks code has been rewritten from scratch. When you have a convenient opportunity to test the new version of the code (which will be present in Epiphany 3.23.1) please check to see if your issue is still a problem, and reply here. Thanks!
Comment 5 Michael Catanzaro 2016-10-07 21:28:47 UTC
Hi, this is a mass close of all bugs in the NEEDINFO state. If you think this bug was closed improperly, just leave a comment, thanks!