403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/apport/crashdb_impl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/apport/crashdb_impl/__pycache__/launchpad.cpython-314.pyc
+
e��i����Rt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIt^RIt^RI
t
^RIt^RIt^RIHtHt^RIHt^RIHtHt^RIHt^RIHt^RIt^RI t^RI!t^RI"H#t$Rt%]PLPOR	4t(R
t)Rt*!RR
]PVPX4t,Rs-!RR]P\P^4t0!RR]PbPd4t3RRlt4R# ]dRtL�i;i)z,Crash database implementation for Launchpad.N)�IO�Any)�FailedToDecompressContent)�	HTTPError�RestfulError��	Launchpad)�lookup_web_root)�impl�
productionz%~/.cache/apport/launchpad.credentialsc#�D"�VF^pVPP4pTPpTPR4'gTPR4'gKZTx�K`	R# \\3d$\P
P
R4K�i;i5i)z"Broken attachment on bug, ignoring�.txt�.gzN)	�data�openrr�apport�logging�error�filename�endswith)�attachments�
attachment�f�names&   �?/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py�filter_filenamer2s���!�
�	����$�$�&�A��z�z���=�=�� � �D�M�M�%�$8�$8��G�"���4�5�	��N�N� � �!E�F��	�s3�B �A)�"B �B �
B �)0B�B �B�B c�&�\RV44#)c3�"�TF7p\VPPR4P44x�K9	R#5i)�/N)�int�	self_link�split�pop)�.0�is& r�	<genexpr>�id_set.<locals>.<genexpr>@s0���@�%�Q�s�1�;�;�$�$�S�)�-�-�/�0�0�%�s�?A)�set)�taskss&r�id_setr)>s���@�%�@�@�@�c��a�]tRt^CtoRtV3RlRlt]V3RlRl4tRt]R4t	R6R	lt
V3R
lRltRtV3R
lRlt
RtR7RltR8RltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltV3RlRltR tV3R!lR"ltV3R#lR$ltR%tV3R&lR'ltV3R(lR)ltR9V3R*lR+lltR,tR-t R.t!V3R/lR0lt"V3R1lR2lt#]$V3R3lR4l4t%R5t&Vt'R#):�
CrashDatabasez5Launchpad implementation of crash database interface.c�N<�V^8�dQhRS[R,RS[S[S[3,RR/#)��	auth_fileN�options�return)�str�dictr)�format�
__classdict__s"�r�__annotate__�CrashDatabase.__annotate__Fs8���FO�FO�#��*�FO�t�C��H�~�FO�$�FOr*c���\P!R4'd\P!R4VR&V'gOVPR4pV'd0RP\VPR^4R,34pM\p\PPPWV4VPR4Vn
VP'dRV9gQR4hMRV9gQR4hR	V9dR
VR	,R2VnMR
\P!4R2VnW nWnVP'gQhRVnRVn\P!R
VPR44VnVP$'gP\&P(!RR7Vn\*P,!\.P0VP$RR7R#R#)a_Initialize Launchpad crash database.

You need to specify a launchpadlib-style credentials file to
access launchpad. If you supply None, it will use
DEFAULT_CREDENTIALS_PATH (~/.cache/apport/launchpad.credentials).

Recognized options are:
- distro: Name of the distribution in Launchpad
- project: Name of the project in Launchpad
  (Note that exactly one of "distro" or "project" must be given.)
- launchpad_instance: If set, this uses the given launchpad instance
  instead of production (optional). This can be overridden or set by
  $APPORT_LAUNCHPAD_INSTANCE environment. For example: "qastaging" or
  "staging".
- cache_dir: Path to a permanent cache directory; by default it uses a
  temporary one. (optional). This can be overridden or set by
  $APPORT_LAUNCHPAD_CACHE environment.
- escalation_subscription: This subscribes the given person or team to
  a bug once it gets the 10th duplicate.
- escalation_tag: This adds the given tag to a bug once it gets more
  than 10 duplicates.
- initial_subscriber: The Launchpad user which gets subscribed to newly
  filed bugs (default: "apport"). It should be a bot user which the
  crash-digger instance runs as, as this will get to see all bug
  details immediately.
- triaging_team: The Launchpad user/team which gets subscribed after
  updating a crash report bug by the retracer (default:
  "ubuntu-crashes-universe")
- architecture: If set, this sets and watches out for needs-*-retrace
  tags of this architecture. This is useful when being used with
  apport-retrace and crash-digger to process crash reports of foreign
  architectures. Defaults to system architecture.
�APPORT_LAUNCHPAD_INSTANCE�launchpad_instance�.z://�distro�projectz/Must not set both "project" and "distro" optionz0Need to have either "project" or "distro" option�architecturezneed-�-retraceN�APPORT_LAUNCHPAD_CACHE�	cache_dirzlaunchpadlib.cache.)�prefixT)�
ignore_errors���)�os�getenv�get�join�DEFAULT_CREDENTIALS_PATHr!r�crashdbr,�__init__r<�arch_tag�	packaging�get_system_architecturer0�auth�_CrashDatabase__launchpad�_CrashDatabase__lp_distro�_CrashDatabase__lpcache�tempfile�mkdtemp�atexit�register�shutil�rmtree)�selfr/r0�lp_instances&&& rrK�CrashDatabase.__init__Fs���D�9�9�0�1�1�,.�I�I�6Q�,R�G�(�)��!�+�+�&:�;�K���H�H�-�{�/@�/@���/J�2�/N�O��	�5�	����$�$�-�-�d�w�G��k�k�(�+����;�;�;���(�
A�@�
A�(��W�$�
B�A�
B�$��W�$�#�G�N�$;�#<�H�E�D�M�#�I�$E�$E�$G�#H��Q�D�M����	��y�y�y��y�-1���������#;�W�[�[��=U�V����~�~�~�%�-�-�5J�K�D�N��O�O�F�M�M�4�>�>��N�r*c� <�V^8�dQhRS[/#�r.r1r)r4r5s"�rr6r7�s���( �( �9�( r*c���VP'd
VP#\fO\PP	R\P
^,R24\P!^4VPPR4'dVPPR4pM\p\PPVP4pV'd<\PPV4'g\P!V4\P !RVVP"R.VPRR7VnVP# \$\&\(3dkp\*P,P/R	\1TR
\3T44TP4\P!^c4Rp?TP#Rp?ii;i)zReturn Launchpad instance.NzERROR: The launchpadlib Python zK module is not installed. Please install the python3-launchpadlib package!
r:zapport-collect�
WRITE_PRIVATEz1.0)�launchpadlib_dir�allow_access_levels�credentials_file�versionzZconnecting to Launchpad failed: %s
You can reset the credentials by removing the file "%s"�content)rPr�sys�stderr�writerc�exitr0rG�DEFAULT_LAUNCHPAD_INSTANCErE�path�dirnamerO�isdir�makedirs�
login_withrRr�OSError�
ValueErrorrrr�getattrr2)rYr:�auth_dirrs&   r�	launchpad�CrashDatabase.launchpad�sm�������#�#�#����J�J���1�#�+�+�a�.�1A�BF�G�
�

�H�H�Q�K��<�<���0�1�1�!%���!1�!1�2F�!G��!;���7�7�?�?�4�9�9�-���B�G�G�M�M�(�3�3��K�K��!�	�(�3�3� �"�!%���%4�$5�!%����
 �D��"������g�z�2�	��N�N� � �J���y�#�e�*�5��	�	�	
�
�H�H�R�L�L������	�s�%6E'�'G'�=AG"�"G'c#�,"�VP'gR#VFupVPP4VP8XgF\P!RVPR2VPP44'gKqVx�Kw	R#5i)Nz^.+\(z.*\)$)r<�bug_target_name�lower�re�match)rYr(�ts&& r�_get_distro_tasks�CrashDatabase._get_distro_tasks�sn����{�{�{���A�� � �&�&�(�D�K�K�7�2�8�8�����
�U�+�Q�->�->�-D�-D�-F�<�<���	�s�BB�

Bc��VPf�VP'd9VPPVP,VnVP#RVP9d@VPP
VPR,,VnVP#\
R4hVP#)z,Return Launchpad distribution (e.g. ubuntu).r=z:distro or project needs to be specified in crashdb options)rQr<rs�
distributionsr0�projects�SystemError)rYs&r�	lp_distro�CrashDatabase.lp_distro�s������#��{�{�{�#'�>�>�#?�#?����#L�� ������d�l�l�*�#'�>�>�#:�#:�4�<�<�	�;R�#S�� �����	"�P������r*Nc���VPV4'gQhVPV4p\WBVP4R7pVP	4V'gQhV#)aoUpload given problem report return a handle for it.

This should happen noninteractively.

If the implementation supports it, and a function progress_callback is
passed, that is called repeatedly with two arguments: the number of
bytes already sent, and the total number of bytes to send. This can be
used to provide a proper upload progress indication on frontends.
)�hostname)�accepts�_generate_upload_blob�upload_blob�get_hostname�close)rY�report�progress_callback�user_message_callback�	blob_file�tickets&&&&  r�upload�CrashDatabase.upload�sT���|�|�F�#�#�#�#��.�.�v�6�	��Y�D�DU�DU�DW�X�������
�v��
r*c� <�V^8�dQhRS[/#r]�r2)r4r5s"�rr6r7�s�����c�r*c��VPPR\4p\PP\
V44pVP#)z/Return the hostname for the Launchpad instance.r:)r0rGri�urllib�parse�urlparser	�netloc)rYr:�urls&  rr��CrashDatabase.get_hostname�sC��!�\�\�-�-� �"<�
���l�l�#�#�O�4F�$G�H���z�z�r*c�2�/pVPRVP44pV'dWCR&VP4pRV9dVR,pMVPPR4pV'd,RVRVRVR\P
P
V42#R	V9d@RVRVPR
VR	,RVR\P
P
V42
#RVRVPRVR\P
P
V42#)aReturn an URL that should be opened after report has been uploaded
and upload() returned handle.

Should return None if no URL should be opened (anonymous filing without
user comments); in that case this function should do whichever
interactive steps it wants to perform.
�Titlezfield.title�
SnapSourcer=�
https://bugs.rz
/+filebug/�?�
SourcePackagez	/+source/)rG�standard_titler�r0r�r��	urlencoder<)rYr��handle�args�titler�r=s&&&    r�get_comment_url�CrashDatabase.get_comment_url�s$�����
�
�7�F�$9�$9�$;�<���"'����$�$�&���6�!��\�*�G��l�l�&�&�y�1�G����z��7�)�:�f�X��F�L�L�*�*�4�0�1�3�
�
�f�$���z��4�;�;�-�8��?�+�,�J�v�h��F�L�L�*�*�4�0�1�3�
��H�:�Q�t�{�{�m�:�f�X�����&�&�t�,�-�
/�	
r*c�T<�V^8�dQhRS[PPRS[RS[/#)r.r��crash_idr1)rr��Reportrr2)r4r5s"�rr6r7s1���E�E����!5�!5�E��E��Er*c�.�RVP4RV2#)z�Return URL for a given report ID.

The report is passed in case building the URL needs additional
information from it, such as the SourcePackage name.

Return None if URL is not available or cannot be determined.
r�z/bugs/)r�)rYr�r�s&&&r�
get_id_url�CrashDatabase.get_id_urls!���t�0�0�2�3�6�(��D�Dr*c�0�\PP4pVPPV,p\
P!RVP\
P4pV'gF\
P!RVP\
P\
P,4pV'gQR4hVP^4PR4PRR4PRR4pR	V9dmR
V9dMVPR
^4wrgVPR	R4R
,VPR	^4^,,pMVPR	^4^,pVP\P !V44RV9dVP"P%4VR&RV9d~R
VP(9dRVR&MfRVP(9dRVR&MORVP(9dRVR&M8RVP(9dRVR&M!\+R\-VP(424hVP/VP(4RV9d
VR,VR&VP0VR&\3VP44F�p\6P8P;VP<4wr�RW)&T
R8Xd/TPC4Y)&Y),PER4Y)&KhT
R8Xd>\HPJ!TR7;_uu_4pTPC4Y)&RRR4K�\QRTP<24h	V# \&dTP"TR&EL�i;i \>\@\*3dEKi;i \FdEKi;i +'giEK,;i \LdApR\-T49dhTPO^4TPC4Y)&Rp?EKuRp?ii;i)z>Download the problem report from given ID and return a Report.z(ProblemType:.*)$z^--- \r?$[\r\n]*(.*)z8bug description must contain standard apport format data�UTF-8s � s
�
s

sUname:�Date�ProblemTypez
apport-bug�Bug�apport-crash�Crashzapport-kernelcrash�KernelCrashzapport-package�Packagez(cannot determine ProblemType from tags: r��
OriginalTitle�r
r)�fileobjNz
Not a gzipzUnknown attachment type: ))rr�r�rs�bugsrx�search�description�S�M�group�encode�replacer!�load�io�BytesIO�date_created�ctime�AttributeError�tagsrpr2�add_tagsr�rrrErj�splitextr�AssertionError�	TypeError�read�decode�UnicodeDecodeError�gzip�GzipFilero�seek�NotImplementedError)
rYr�r��b�mr��part1�part2r�key�ext�gzrs
&&           r�download�CrashDatabase.downloadsl�����%�%�'���N�N����)��
�I�I�*�A�M�M�2�4�4�@����	�	�1�1�=�=�"�$�$����+�N�A��L�L�L�q�
�G�G�A�J�
�V�G�_�
�W�[�$�
'�
�W�W�e�
$�		��k�!��K�'� +�0�0��A�>����M�M�'�5�1�� ��k�k�'�1�-�a�0�1��*�/�/���;�A�>�����B�J�J�{�+�,����

0�!"���!5�!5�!7��v����&��q�v�v�%�(-��}�%��1�6�6�)�(/��}�%�%����/�(5��}�%�!�Q�V�V�+�(1��}�%� �>�s�1�6�6�{�m�L���	��������f��&,�W�o�F�?�#��'�'��w��)�!�-�-�8�J��w�w�'�'�
�(;�(;�<�H�C�
� ����f�}�(�o�o�/����"(�+�"4�"4�W�"=�F�K����	4����z�:�:�b�&(�g�g�i���;�:�*�/�
�0C�0C�/D�E���39�8�
��i"�
0�!"����v��
0��:#�I�z�:�
��
��*�����;�:�:���4�$�3�u�:�5���O�O�A�&�",�/�/�"3�F�K�K��
4�sl�(M#�
N�(N"�O
�*N5�=O
�#N�N�N�N�"N2�1N2�5O�O
�O
�
P�4P�Pc�V�VPPV,pV'd+\VP44\V4,
pMRp\P
!4;_uu_4p	VP
W�R7V	P4V	P^4\P!V	4p
V
P4p\V4pVP4'gQh\V4pVP4'dQhVP4R8XgQhV'g�VPR,p
V
P!R4RV9d-W�P#VR,4P%4,
p
W�nVP'4VPPV,pVP)RR7P+R	R
4pV'dVV'd(VP,RV2VnVP'4M&V'g
VP.pVP1W�R7VFPpTP3T;'gR
VP54RVP)RR7VP54RR7KR	RRR4R# +'giR#;i)aUpdate the given report ID with all data from report.

This creates a text comment with the "short" data (see
ProblemReport.write_mime()), and creates attachments for all the
bulk/binary data.

If change_description is True, and the crash db implementation supports
it, the short data will be put into the description instead (like in a
new bug).

comment will be added to the "short" data. If attachment_comment is
given, it will be added to the attachment uploads.

If key_filter is a list or set, then only those keys will be added.
N)�	skip_keysz
text/plain�NNNzapport-collected�TagsT)r�r�r�z
--- 
�rd�subjectr�F)�commentr��content_typerr�is_patch)rsr�r'�keysrS�
TemporaryFile�
write_mime�flushr��email�message_from_binary_file�walk�next�is_multipart�get_content_typer��append�_filter_tag_namesr!�lp_save�get_payloadr�r�r��
newMessage�
addAttachment�get_filename)rYr�r�r��change_description�attachment_comment�
key_filter�bugr��mime�msg�msg_iter�part�x�texts&&&&&&&        r�update�CrashDatabase.update�s��0�n�n�!�!�(�+����F�K�K�M�*�S��_�<�I��I�
�
#�
#�
%�
%�����d��8��J�J�L��I�I�a�L��0�0��6�C��x�x�z�H���>�D��$�$�&�&�&�&���>�D��(�(�*�*�*�*��(�(�*�l�:�:�:���H�H�Q�K�����+�,��V�#��/�/��v��?�E�E�G�G�A������
��n�n�)�)�(�3���#�#�4�#�0�7�7���K�D��%�),���(9��$��&H�C�O��K�K�M�"�"%�)�)���N�N�4�N�A�!���!�!�.�4�4�"� $� 1� 1� 3�!%��)�)��)�6�!�.�.�0�"�
"��!�W&�
%�
%�
%�s,�/B>J�.B3J�"J�*.J�6J�=J�J(	c��\PPPWW#4VPP
V,pRV9d�VPF�pVPPPR4'gK0VPPVR,R7VnVP4VPP
V,pM	VP4'Ed?VPF'pVPR8XgKVP!4K)	VP%VP4p\'V4pVP(R8XdRVnVP4TP-4pT'd�\.P0!RTP4pT'dxTP3^4T8wdbTP3^4T,TP3^4,TnTP4TPP
T,pVP5WB4R# \"dEKTi;i \*dL�i;i \"dLai;i)	z�Update the given report ID for retracing results.

This updates Stacktrace, ThreadStacktrace, StacktraceTop,
and StacktraceSource. You can also supply an additional comment.
r��
#distribution�r�CoreDump.gz�	Undecided�Mediumz,^(.*crashed with SIG.* in )([^( ]+)(\(\).*$)N)rrJr,�
update_tracesrsr��	bug_tasks�target�resource_type_linkrr��getSourcePackager��has_useful_stacktracerr��
removeFromBugrr{r��
importance�
StopIteration�stacktrace_top_functionrxryr��_subscribe_triaging_team)	rYr�r�r�r��task�a�fnr�s	&&&&     rr
�CrashDatabase.update_traces�s���	���$�$�2�2�4�6�S��n�n�!�!�(�+���f�$��
�
���;�;�1�1�:�:�?�K�K�"&�.�.�"A�"A�#�O�4�#B�#�D�K��L�L�N��.�.�-�-�h�7�C��&��'�'�)�)��_�_���7�7�m�+�����)�%�
��-�-�c�m�m�<���D�z���?�?�k�1�&.�D�O��L�L�N�
�/�/�1�B���H�H�L�c�i�i�X��������r�)� !����
�R��!�'�'�!�*� <�C�I�����
��.�.�-�-�h�7�C��%�%�c�2��/%�����!�
��
��%����s7�I�3AI�I0�I�I�I-�,I-�0I>�=I>c�&<�V^8�dQhRS[RS[/#�r.r�r1�rr2)r4r5s"�rr6r7
s���F�F�3�F�3�Fr*c���VPPV,p\P!RVP4pV'dVP^4#\
R4h)zFGet 'DistroRelease: <release>' from the given report ID and return
it.z"DistroRelease: ([-a-zA-Z0-9.+/ ]+)z)URL does not contain DistroRelease: field)rsr�rxr�r�r�rp)rYr�r�r�s&&  r�get_distro_release� CrashDatabase.get_distro_release
sJ���n�n�!�!�(�+���I�I�:�C�O�O�L����7�7�1�:���D�E�Er*c�6<�V^8�dQhRS[RS[S[,/#r)r�listr2)r4r5s"�rr6r7s�����c��d�3�i�r*c�v�\P!RVPR24pVPPV,p.pVP
FepVP
VPP4pV'gK2VPR9dKEVPVPR44Kg	V#)z5Return list of affected source packages for given ID.rz2/(?:(?P<suite>[^/]+)/)?\+source/(?P<source>[^/]+)$�source>�Invalid�	Won't Fix�Fix Released)rx�compiler<rsr�rr�rr �statusr�r�)rYr��
bug_target_rer��resultrrys&&     r�get_affected_packages�#CrashDatabase.get_affected_packagess����
�
�����
�T�U�
�
��n�n�!�!�(�+�����M�M�D�!�(�(����)>�)>�?�E����{�{�F�F���M�M�%�+�+�h�/�0�
"��
r*c�&<�V^8�dQhRS[RS[/#r�r�bool)r4r5s"�rr6r7(s���8�8�C�8�D�8r*c��VPPV,pVPPVPPP8H#)z3Check whether the user is the reporter of given ID.)rsr��ownerr�me)rYr�r�s&& r�is_reporter�CrashDatabase.is_reporter(s9���n�n�!�!�(�+���y�y�~�~����!2�!2�!7�!7�7�7r*c�&<�V^8�dQhRS[RS[/#rr-)r4r5s"�rr6r7-s�����3��4�r*c�z�VPPV,pVP'dR#VPPVPP
P8XdR#VPP
PpVPPFpVR,V8XgKR#	R#)aCheck whether the user is eligible to update a report.

A user should add additional information to an existing ID if (s)he is
the reporter or subscribed, the bug is open, not a duplicate, etc. The
exact policy and checks should be done according to the particular
implementation.
FT�person_link)	rsr��duplicate_ofr0rr1r �
subscriptions�entries)rYr�r�r1�subs&&   r�
can_update�CrashDatabase.can_update-s����n�n�!�!�(�+��������9�9�>�>�T�^�^�.�.�3�3�3���^�^�
�
�
(�
(���$�$�,�,�C��=�!�R�'��-�r*c�0<�V^8�dQhRS[S[,/#r]�r'r)r4r5s"�rr6r7Ds���
�
��C��
r*c��VPPVPRR7p\V4# \dKp\
PPR\T44\P!^c4Rp?R#Rp?ii;i)zuReturn an ID set of all crashes which have not been retraced yet and
which happened on the current host architecture.�
2011-08-01�r��
created_since�"connecting to Launchpad failed: %sN)r��searchTasksrLr)rrrrr2rerh�rYr�rs&  r�get_unretraced�CrashDatabase.get_unretracedDsk��	��>�>�-�-��]�]�,�.��D��$�<����	��N�N� � �!E�s�5�z�R��H�H�R�L�L��	�s�14�B	�?B�B	c�0<�V^8�dQhRS[S[,/#r]r>)r4r5s"�rr6r7Ps�����3�s�8�r*c��VPPRRR7p\V4# \dKp\P
P
R\T44\P!^c4Rp?R#Rp?ii;i)aReturn an ID set of all crashes which have not been checked for
being a duplicate.

This is mainly useful for crashes of scripting languages such as
Python, since they do not need to be retraced. It should not return
bugs that are covered by get_unretraced().
�need-duplicate-checkr@rArCN)
r�rDr)rrrrr2rerhrEs&  r�get_dup_unchecked�CrashDatabase.get_dup_uncheckedPsg��	��>�>�-�-�+�<�.��D��$�<����	��N�N� � �!E�s�5�z�R��H�H�R�L�L��	�s�'*�A?�?A:�:A?c�0<�V^8�dQhRS[S[,/#r]r>)r4r5s"�rr6r7as���
�
�S��X�
r*c�P�VPPRR7p\V4#)a0Return an ID set of all crashes which are not yet fixed.

The list must not contain bugs which were rejected or duplicate.

This function should make sure that the returned list is correct. If
there are any errors with connecting to the crash database, it should
raise an exception (preferably OSError).
r�)r�)r�rDr))rYr�s& r�get_unfixed�CrashDatabase.get_unfixedas%���~�~�)�)�~�)�>���d�|�r*c��VPPPRVVPPR7pV^,P#)z�Return the version of given source package in the latest release of
given distribution.

If 'distro' is None, we will look for a launchpad project .
T)�exact_match�source_name�
distro_series)r��main_archive�getPublishedSources�current_series�source_package_version)rY�package�sourcess&& r�_get_source_version�!CrashDatabase._get_source_versionmsI���.�.�-�-�A�A����.�.�7�7�B�
���q�z�0�0�0r*c�4<�V^8�dQhRS[RS[R,/#�r.r�r1Nr)r4r5s"�rr6r7{s#���a�a�#�a�#��*�ar*c�Ba�VPPV,pTP'dR#\	TP
4pTP'EdbRTPP4R2o\	\T3RlT44pT'gWTFPpTPR8XgKTPP4TPP48XgKOR#	\T4^8�d.\PPRTPT4R#T'dBTP4pTP!TP"P%4^,4#\	\T3RlT44pT'd$\	\T3R	lT44pT'gR#R#\	\R
T44pT'dR#\	\RT44'dR#R# \dR#i;i \&dR#i;i)
a�Return the package version that fixes a given crash.

Return None if the crash is not yet fixed, or an empty string if the
crash is fixed, but it cannot be determined by which version. Return
'invalid' if the crash report got invalidated, such as closed a
duplicate or rejected.

This function should make sure that the returned result is correct. If
there are any errors with connecting to the crash database, it should
raise an exception (preferably OSError).
�invalid�(�)c�l<�VPR8H;'dSVPP49#�r%�r'�bug_target_display_namerw�r�distro_identifiers&�r�<lambda>�1CrashDatabase.get_fixed_version.<locals>.<lambda>�s7�������!>�"R�"R�)�T�-I�-I�-O�-O�-Q�Q�"Rr*r%r�zVThere is more than one task fixed in %s %s, using first one to determine fixed versionc�l<�VPR9;'dSVPP49#)r#>�Expiredr#r$rergs&�rrirj�s8���T�[�[�4W�%W�&V�&V�-��1M�1M�1S�1S�1U�U�&Vr*c�l<�VPR9;'dSVPP49#)r#)r#r$rlrergs&�rrirj�s?������#F�*G�*D�*D� 1�#�;�;�A�A�C�!D�*Dr*c� �VPR8H#rd�r'�rs&rrirj�s
��D�K�K�>�$Ar*c� �VPR8H#)r#rorps&rrirj�s
�����y�(@r*N)rsr��KeyErrorr7r rr<rw�filterr'rv�lenrr�warningr"r[rfr!�
IndexError)	rYr�r�r(�fixed_tasksr�
invalid_tasks�non_invalid_tasksrhs	&&      @r�get_fixed_version�CrashDatabase.get_fixed_version{s����$	����#�#�H�-�A�
�>�>�>���Q�[�[�!���;�;�;�"#�D�K�K�$5�$5�$7�#8�� :����R����K��!�D����~�5� �0�0�6�6�8�D�K�K�<M�<M�<O�O� "�
"��;��!�#����&�&�B��K�K��	���"���(��%��3�3��4�4�:�:�<�Q�?���!%��V���!�
�!�(,��D�"��)�%�-�(����A�5�I��K����F�@�%�H�I�I� ���[�	��	��T"�%�$�%�s#�G=�/H�=H�H�H�Hc�4<�V^8�dQhRS[RS[R,/#r^�r)r4r5s"�rr6r7�s�����S��S�4�Z�r*c�|�VPPV,PpV'd
VP#R#)zSReturn master ID for a duplicate bug.

If the bug is not a duplicate, return None.
N)rsr�r7�id)rYr�r�s&& rr7�CrashDatabase.duplicate_of�s-��

�N�N����)�6�6����4�4�K�r*c���VPPV,pV'Ed�W#8wgQR\V4R24hVPPV,pVP'dMVPpVPpVPV8Xd$\
PPRVV4R#VPF'pVPR9gKVP4K)	VPPV,pVPRVR2RR7VPPV,pVP'dR	Vn
VP'gWTnVPp\VP 4^
8Xd�R
VP"9djVP"R
,V9dRVP"P%RR4V9d1VVP"R
,.,VnVP'4R
VP"9dbVP"P%RR4V9dAVPP(VP"R
,,pVP+VR7VP-4'd�RV9gRV9d�VP/VVRV2.ROR7VPPV,pVPR,p	V	P1R4V	P1R4W�nVP'4R.p
VP4P6F1pVP8R9dKV
P;VP<4K3	\?VP4pVPpVPAV4p
V
FpW�9gKVP;V4K	WunVP'4MVP'dRVnVPB'dVP'4R#R# \dEKoi;i \2dELBi;i \2dELBi;i \dEL=i;i)z\Mark a crash id as duplicate of given master ID.

If master is None, id gets un-duplicated.
zcannot mark bug z as a duplicate of itselfzNBug %i was manually marked as a dupe of newer bug %i, not closing as duplicateNz�Thank you for taking the time to report this crash and helping to make this software better.  This particular crash has already been reported and is a duplicate of bug #aE, so is being marked as such.  Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug.  Additionally, any further discussion regarding the bug should occur in the other report.  Please continue to report any other bugs you may find.zThis bug is a duplicater�F�escalation_tag�
escalated_tagz	 invalid �escalation_subscription��personzapport-request-retrace�apport-failed-retracez'Updated stack trace from duplicate bug )r�r�zbugpattern-needed>r�ProcMaps.txt�
Registers.txt�ProcStatus.txt�Stacktrace.txt�Disassembly.txt�ThreadStacktrace.txt)�
Stacktrace�ThreadStacktracer��Dependencies�ProcMaps�ProcCmdline)zActive DevelopmentzCurrent Stable Release�	SupportedzPre-release Freeze)"rsr�r2r7rrrrurr�rrr��privater�rt�
duplicatesr0rGr��people�	subscriberr�removerpr��seriesr'r�rr'�
difference�_dirty_attributes)rYr�r��	master_idr��masterr�master_tags�pr�tags_to_copyr��	dupe_tags�missing_tags�tags&&&&           r�close_duplicate�CrashDatabase.close_duplicate�s����n�n�!�!�(�+���9��%�
K�!�#�h�-��0I�J�
K�%��^�^�(�(��3�F��"�"�"��,�,��"�I�I�	��9�9��(��N�N�*�*�4� �!�	���_�_���7�7�������)�%� �.�.�%�%�h�/�C��N�N���K� �	�2�
�
��.�.�%�%�h�/�C��{�{�{�#����#�#�#�#)� �!�+�+�K��6�$�$�%��+�$����4����%5�6�k�I����(�(��+�F�&�'�#.����%5�6�1�#�F�K��N�N�$�.����=����(�(��+�F�&�'����-�-�d�l�l�;T�.U�V�A��$�$�A�$�.��+�+�-�-�(�K�7�*�k�9������=�h�Z�H� �	�����,�,�Y�7���K�K��N����H�H�4�5���H�H�5�6� ����N�N�$�
0�0�L��.�.�/�/���=�=�)����#�#�F�K�K�0�0��C�H�H�
�I� �+�+�K�$�/�/��<�L�#���&��&�&�s�+�$�&�K��N�N��
�
�
�
�#�C��� � � ��K�K�M�!��g%�����V"�����"�����
!����sH�P(�6P;�Q
� Q�(P8�7P8�;Q
�	Q
�
Q�Q�Q.�-Q.c�*<�V^8�dQhRS[RS[RR/#)r.r�r�r1Nr})r4r5s"�rr6r7�s"�������S��T�r*c��VPPV,pVPRVR2RR7VPPV,pVPR.,VnVP	4R#)ziMark a crash id as reintroducing an earlier crash which is
already marked as fixed (having ID 'master').
z<This crash has the same stack trace characteristics as bug #z�. However, the latter was already fixed in an earlier package version than the one in this report. This might be a regression or because the problem is in a dependent package.zPossible regression detectedr�zregression-retracerN)rsr�r�r�r�)rYr�r�r�s&&& r�mark_regression�CrashDatabase.mark_regression�su���n�n�!�!�(�+�������H���
3�
	�	
��n�n�!�!�(�+���8�8�4�5�5������
r*c�$<�V^8�dQhRS[RR/#r^r})r4r5s"�rr6r7�s���
�
�c�
�d�
r*c�(�VPPV,pVPVP9dHVPR,pVP	VP4W2nVP4R#R# \dR#i;i)zMark crash id as retraced.r�N)rsr�rLr�r�r�r)rYr�r�rs&&  r�
mark_retraced�CrashDatabase.mark_retraced�so���n�n�!�!�(�+���=�=�C�H�H�$������A�
�H�H�T�]�]�#��H�
����
�%���
��
�s�.B�B�Bc�8<�V^8�dQhRS[RS[R,RR/#)r.r��invalid_msgNr1r)r4r5s"�rr6r7�s)�������*-��*��	
�r*c�H�VPPV,pV'd�VPVP4p\	V4pRVnVP4VPVRR7VPF'pVPR8XgKVP4K)	R#RVP9d,VPR.,Vn
VP4R#R# \
dTP^,pL�i;i \dK�i;i)z%Mark crash id as 'failed to retrace'.r#z Crash report cannot be processedr�rr�N)rsr�r{rr�rr'r�r�rr�rrr�)rYr�r�r�rrs&&&   r�mark_retrace_failed�!CrashDatabase.mark_retrace_failed�s����n�n�!�!�(�+���
(��-�-�c�m�m�<���D�z��$�D�K��L�L�N��N�N�#�-O�
�
��_�_���7�7�m�+�����)�%�%�C�H�H�
4��x�x�#:�";�;�C�H��K�K�M�5��!�
(��}�}�Q�'��
(��%����s#�&C.�D�.D�D�D!� D!c��VPPV,pRV9d�VPF�pVPPPR4'gK0VPPVR,R7VnVP4VPPV,pM	RVP9d�VPR,pVPR4WSn
VP4RV9d[VPFJpRVPP9gK VPR8XgK3RVnVP4KL	VPW24R	# \dL�i;i)
z/Mark crash id as checked for being a duplicate.r�rrrJr��	Tracebackrr	N)rsr�rrr
rr�rr�rr�r�rr)rYr�r�r�rrs&&&   r�_mark_dup_checked�CrashDatabase._mark_dup_checked�s4���n�n�!�!�(�+���f�$��
�
���;�;�1�1�:�:�?�K�K�"&�.�.�"A�"A�#�O�4�#B�#�D�K������"�n�n�1�1�(�;��
�&�"�S�X�X�-������A�
�H�H�+�,��H��K�K�M��f�$��M�M�D�&�$�+�+�*H�*H�H��?�?�k�9�.6�D�O� �L�L�N�	*�
	
�%�%�c�2��#%����s�
-E:�:F�Fc�4�\PPPW4pV'gV#W!R&\P
P
VR24;_uu_4pVP4pVPR4'gRRR4R#VFMpVPR4'dRV9gRV9dRRR4R#MVP4'dKMM	RRR4V# +'giT#;i \dTu#i;i)	a>Check if the crash db already knows about the crash signature.

Check if the report has a DuplicateSignature, crash_signature(), or
StacktraceAddressSignature, and ask the database whether the problem is
already known. If so, return an URL where the user can check the status
or subscribe (if available), or just return True if the report is known
but there is no public URL. In that case the report will not be
uploaded (i. e. upload() will not be called).

Return None if the report does not have any signature or the crash
database does not support checking for duplicates on the client side.

The default implementation uses a text file format generated by
duplicate_db_publish() at an URL specified by the "dupdb_url" option.
Subclasses are free to override this with a custom implementation, such
as a real database lookup.
�DuplicateOfz/+textsbug:NTstags:sapport-failed-retracesapport-request-retrace)rrJr,�knownr��request�urlopen�readline�
startswith�stripro)rYr�r�r�lines&&   rr��CrashDatabase.known�s���*�n�n�*�*�0�0��>����J�!$�}��	����'�'�3�%�v��7�7�1��z�z�|�����w�/�/� �8�7��D����x�0�0�4��<�8�D�@�#'�8�7�� �:�:�<�<���8�2�
�38�7�2�
���	��J�	�sM�*D�#)C3�D�+C3�D�C3�%C3�)D�3D	�>D�D�
D�Dc	��RV9d&VR,P4^,R8wdR#VPPRR4pVPPRV2pVP\
VPP4R4PR4VPUu.uF&p\
V4PR^R	7R,NK(	up9dVPVR
7R#R#uupi)z-Subscribe the right triaging team to the bug.�
DistroRelease�UbuntuN�
triaging_teamzubuntu-crashes-universe�~r�r)�maxsplitr�rD)
r!r0rGrs�	_root_urir�r2r�r8r�)rYr�r��teamr�r:s&&&   rr�&CrashDatabase._subscribe_triaging_teams���
�f�$���)@�)F�)F�)H��)K�x�)W���|�|����1J�K���N�N�,�,�-�Q�t�f�5���>�>�#�d�n�n�6�6�7��<�B�B�3�G�;>�;L�;L�P
�;L�C�C��H�N�N�3��N�+�B�/�/�;L�P
�
�
�M�M��M�(�
��P
s�/,C8c�d<�V^8�dQhRS[PPRS[S[S[3,/#�r.r�r1)rr�r�r3r2)r4r5s"�rr6r7-s.���%�%�v�}�}�/C�/C�%��S�RU�X��%r*c��RRVR,P42/pVPR4pV'dVR8XdVPR4pV'dVR;;,RV2,
uu&RV9d/VR;;,RVPVR,42,
uu&RV9d�R	V9dR
VR&V'd]RV9gR
V9dOR
VR&VPRVPPRR44VR&VR;;,RVR2,
uu&M&RV9d R
VR&RVR&VR;;,R,
uu&RV9d$RVR,9dVR;;,R,
uu&RV9d
VR,VR&V#)z;Generate the headers for the multipart/MIME temporary file.r�zapport-r��PackageArchitecture�all�Architecture� r��LaunchpadPrivate�yes�Private�VmCore�CoreDump�LaunchpadSubscribe�initial_subscriberr�Subscribersz need-r?r�z need-duplicate-check�DuplicateSignaturerJ�CheckboxSubmissionzHWDB-Submission)rwrGr�r0)rYr��hdr�archs&&  r�_generate_upload_headers�&CrashDatabase._generate_upload_headers-su�����
�!6�!<�!<�!>� ?�@�A���z�z�/�0���t�u�}��:�:�n�-�D����K�Q�t�f�:�%�K��V����K�Q�t�5�5�f�V�n�E�F�G�G�K��f�$�!�V�+�!&��I����V�+�z�V�/C�!&��I��%+�Z�Z�(��L�L�$�$�%9�8�D�&��M�"��F����v�X�6�6����&�!&��I��%-��M�"��F��6�6���6�)�.D�C�PV�K�.W���K�2�2�K� �6�)�%+�,@�%A�C�!�"��
r*c�^<�V^8�dQhRS[PPRS[S[,/#r�)rr�r�r�bytes)r4r5s"�rr6r7Ts)�����F�M�M�,@�,@��R��Y�r*c���VPV4p.ROp\P!4pVPVV.ROVR7VP	4VP^4V#)z�Generate a multipart/MIME temporary file for uploading.

You have to close the returned file object after you are done with it.
)�
extra_headersr��priority_fields)	r�r�r��
Regression�Reproducible�TestedUpstream�ProcVersionSignature�Uname�NonfreeKernelModules)r�r�r�)r�rSr�r�r�r�)rYr�r��orderr�s&&   rr��#CrashDatabase._generate_upload_blobTse��
�+�+�F�3��

���%�%�'�������H�!�		�	
�	
�
�
���	�	�!���r*c�&<�V^8�dQhRS[RS[/#)r.r�r1r�)r4r5s"�rr6r7us��������r*c���RpVP4PRRR7F>pVR9g\V4^8�dVR9dV\V4,
pK5VR,
pK@	V#)zBReplace characters from tags which are not palatable to
Launchpad.r��ASCII�ignore)�errorss%abcdefghijklmnopqrstuvwxyz0123456789 s+-.r;)rwr�rt�chr)r��res�chs&  rr��CrashDatabase._filter_tag_namestsa�����*�*�,�%�%�g�h�%�?�B��=�=��C��1���v���s�2�w����s�
��
@��
r*)�__launchpad�__lp_distro�	__lpcacherLrOr<r0)NN)FNN)r��N)(�__name__�
__module__�__qualname__�__firstlineno__�__doc__rK�propertyrsr{r�r�r�r�r�r�rr
rr*r2r;rFrKrOr[rzr7r�r�r�r�r�r�rr�r��staticmethodr��__static_attributes__�__classdictcell__�r5s@rr,r,Cs>����?�FO�FO�P�( ��( �T�� �� ��$��$
�LE�E�a�HV�t13�fF�F���$8�8�
��.
�
���"
�
�1�a�a�F��]�~��$
�
���:3�B7�r)�"%�%�N��@���r*r,c�*a�]tRtRtoRtRtRtVtR#)�HTTPSProgressConnectioni�zSImplement a HTTPSConnection with an optional callback function for
upload progress.c���\'g,\PPP	W4R#^p\V4pRpW#8d�\W#4\P!4p\PPP	WW"V,4W$,
p\P!4V,
pVR8dV^,pK�V^8�gK�VR8�gK�V^,pK�R#)Nig�?)�_https_upload_callback�http�client�HTTPSConnection�sendrt�time)rYr�sent�total�	chunksize�t1�durations&&     rr
�HTTPSProgressConnection.send�s���%�%��K�K�'�'�,�,�T�8�����D�	���	��l�"�4�/�����B��K�K�'�'�,�,�T��y�@P�3R�S���D��y�y�{�R�'�H��#�~��a��	��A��)�d�"2��a��	�r*�N)r�r�r�r�r�r
rrrs@rrr�s����� � r*rc�*a�]tRtRtoRtRtRtVtR#)�HTTPSProgressHandleri�zPImplement a HTTPSHandler with an optional callback function for
upload progress.c�.�VP\V4#r�)�do_openr)rY�reqs&&r�
https_open�HTTPSProgressHandler.https_open�s���|�|�3�S�9�9r*rN)r�r�r�r�r�rrrrs@rrr�s�����:�:r*rc���RpRVR2pVs\PPP	4p\PP
P
R4pVPRR4VPV4\PPPRR4pVPRR	4VPVP4PR
44VPV4\P!4p\P P#VRR7p	V	P%VR
R7\&P(P+WHP-44p
V
PRRVP/424\&P(P1\24pVP5V
4pVP74P9R4pV'gQhV#)aUpload blob (file-like object) to Launchpad.

progress_callback can be set to a function(sent, total) which is regularly
called with the number of bytes already sent and total number of bytes to
send. It is called every 0.5 to 2 seconds (dynamically adapted to upload
bandwidth).

Return None on error, or the ticket number on success.

By default this uses the production Launchpad hostname. Set
hostname to 'launchpad.dev', 'qastaging.launchpad.net', or
'staging.launchpad.net' to use another instance for testing.
Nzhttps://z/+storeblob�1zContent-Dispositionzform-data; name="FORM_SUBMIT"�applicationzoctet-streamz*form-data; name="field.blob"; filename="x"�asciiF)�mangle_from_�
)�linesepzContent-Typezmultipart/form-data; boundary=zX-Launchpad-Blob-Token)rr�r��	multipart�
MIMEMultipartr�MIMEText�
add_header�attach�base�MIMEBase�set_payloadr�r�r�r��	generator�BytesGenerator�flattenr�r��Request�getvalue�get_boundary�build_openerrr�inforG)
�blobr�r�r�r�r�submit�	form_blob�	data_flat�genr�openerr)s
&&&          rr�r��s����F��X�J�k�
*�C�/���:�:���-�-�/�D�
�Z�Z�_�_�
%�
%�c�
*�F�
���+�-L�M��K�K����
�
���(�(���G�I�
����K�����$�)�)�+�,�,�W�5�6��K�K�	���
�
��I�
�/�/�
(�
(���
(�
G�C��K�K��d�K�#��.�.�
 �
 ��&8�&8�&:�
;�C��N�N��8��9J�9J�9L�8M�N���^�^�
(�
(�)=�
>�F�
�[�[��
�F�
�[�[�]�
�
�7�
8�F��M�6��Mr*)Nz
launchpad.net)5r�rUr�r��http.clientrr��os.pathrErxrWrerSr�urllib.parser��urllib.request�typingrr�httplib2r�launchpadlib.errorsrr�launchpadlib.launchpadr�launchpadlib.urisr	�ImportError�apport.crashdbr�apport.logging�
apport.report�apport.packaging_implr
rMrirj�
expanduserrIrr)rJr,rrr	rr��HTTPSHandlerrr�rr*r�<module>rGs���2� ����	��	�
�
�������2�;�0�1�
���3�)���7�7�-�-�.U�V��	�A�
~�F�N�N�0�0�~�L"�� �d�k�k�9�9� �8:�6�>�>�6�6�:�2��_$���I��s�C5�5	D�D

Youez - 2016 - github.com/yon3zu
LinuXploit