Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      Sensitive Code Example

      import android.content.BroadcastReceiver;
      import android.content.Context;
      import android.content.IntentFilter;
      import android.os.Build;
      import android.os.Handler;
      import android.support.annotation.RequiresApi;
      
      public class MyIntentReceiver {
      
          @RequiresApi(api = Build.VERSION_CODES.O)
          public void register(Context context, BroadcastReceiver receiver,
                               IntentFilter filter,
                               String broadcastPermission,
                               Handler scheduler,
                               int flags) {
              context.registerReceiver(receiver, filter); // Sensitive
              context.registerReceiver(receiver, filter, flags); // Sensitive
      
              // Broadcasting intent with "null" for broadcastPermission
              context.registerReceiver(receiver, filter, null, scheduler); // Sensitive
              context.registerReceiver(receiver, filter, null, scheduler, flags); // Sensitive
      
      
              context.registerReceiver(receiver, filter,broadcastPermission, scheduler); // OK
              context.registerReceiver(receiver, filter,broadcastPermission, scheduler, flags); // OK
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nicolas.harraudeau Nicolas Harraudeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: