Crash when the server URL that includes "illegal characters"

Bug #1039671 reported by SlumDroid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tomdroid
Fix Released
Undecided
Unassigned

Bug Description

Occurs in versions 0.4.1, 0.5.0, 0.6.0 and 0.7.0 beta!
This crash is similar to that reported here:

https://bugs.launchpad.net/tomdroid/+bug/902855

The App crashes if in the text box there is:

A) http: \\one.ubuntu.com\notes

     instead of

     http://one.ubuntu.com/notes

B) If there are ONLY "illegal characters"
     :
    \
    ^

The obtained exception stacktrace is reported below:

E/AndroidRuntime( 544): FATAL EXCEPTION: pool-10-thread-1
E/AndroidRuntime( 544): java.lang.IllegalArgumentException: Illegal character in path at index 1: \/api/1.0/
E/AndroidRuntime( 544): at java.net.URI.create(URI.java:776)
E/AndroidRuntime( 544): at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:75)
E/AndroidRuntime( 544): at org.tomdroid.sync.web.AnonymousConnection.get(AnonymousConnection.java:39)
E/AndroidRuntime( 544): at org.tomdroid.sync.web.OAuthConnection.getAuthorizationUrl(OAuthConnection.java:125)
E/AndroidRuntime( 544): at org.tomdroid.sync.web.SnowySyncService$1.run(SnowySyncService.java:103)
E/AndroidRuntime( 544): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
E/AndroidRuntime( 544): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
E/AndroidRuntime( 544): at java.lang.Thread.run(Thread.java:1019)
W/ActivityManager( 68): Force finishing activity org.tomdroid/.ui.Tomdroid
E/WindowManager( 544): Activity org.tomdroid.ui.Tomdroid has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40529c38 that was originally added here
E/WindowManager( 544): android.view.WindowLeaked: Activity org.tomdroid.ui.Tomdroid has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40529c38 that was originally added here
E/WindowManager( 544): at android.view.ViewRoot.<init>(ViewRoot.java:258)
E/WindowManager( 544): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
E/WindowManager( 544): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/WindowManager( 544): at android.view.Window$LocalWindowManager.addView(Window.java:424)
E/WindowManager( 544): at android.app.Dialog.show(Dialog.java:241)
E/WindowManager( 544): at android.app.ProgressDialog.show(ProgressDialog.java:107)
E/WindowManager( 544): at android.app.ProgressDialog.show(ProgressDialog.java:95)
E/WindowManager( 544): at org.tomdroid.ui.Tomdroid.startSyncing(Tomdroid.java:444)
E/WindowManager( 544): at org.tomdroid.ui.Tomdroid.onOptionsItemSelected(Tomdroid.java:391)
E/WindowManager( 544): at android.app.Activity.onMenuItemSelected(Activity.java:2205)
E/WindowManager( 544): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:748)
E/WindowManager( 544): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
E/WindowManager( 544): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
E/WindowManager( 544): at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:532)
E/WindowManager( 544): at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
E/WindowManager( 544): at android.view.View$PerformClick.run(View.java:9080)
E/WindowManager( 544): at android.os.Handler.handleCallback(Handler.java:587)
E/WindowManager( 544): at android.os.Handler.dispatchMessage(Handler.java:92)
E/WindowManager( 544): at android.os.Looper.loop(Looper.java:123)
E/WindowManager( 544): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/WindowManager( 544): at java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager( 544): at java.lang.reflect.Method.invoke(Method.java:507)
E/WindowManager( 544): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/WindowManager( 544): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/WindowManager( 544): at dalvik.system.NativeStart.main(Native Method)

SlumDroid (rame276)
description: updated
summary: - Crash when the server URL that includes "special characters"
+ Crash when the server URL that includes "illegal characters"
SlumDroid (rame276)
Changed in tomdroid:
assignee: nobody → AndroidRipper (rame276)
assignee: AndroidRipper (rame276) → nobody
assignee: nobody → AndroidRipper (rame276)
Revision history for this message
NoahY (noahy) wrote :

Okay, fixed now... sorry, I didn't see you assigned it to yourself; please confirm, it should now show an error dialog instead of accepting an illegal value in the preference.

Changed in tomdroid:
status: New → Fix Committed
Changed in tomdroid:
milestone: none → 0.7.2
SlumDroid (rame276)
Changed in tomdroid:
assignee: AndroidRipper (rame276) → nobody
Changed in tomdroid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.